Update for folks following along with Third-Party Loggers, specifically Logz IO. I am using multiple Anvil Apps to support the Dev / Staging / Production flow, with single Git repository that pushes to multiple remotes.
Due to the fact that only a single anvil.yml can reign supreme at a given time, This creates a challenge for Third-Party Services, like LogzIO in my case. Anyway, I created a little tweak to add the Anvil App Id, to every log message that gets posted to Logzio…
In the logger configuration, you can add the Anvil App Id to every log message
'format': '{"additional_field": "value", "ANVIL_APP_ID": "%s"}' % str(anvil.app.id)
And it looks like this in LogzIO dashboard
So then it is easy to filter DEV log messages out from PRODUCTION log messages.
It’s not as ideal as having 1 logger per environment, but a decent workaround, if anyone else is using Logz IO
(or any backing service as outlined here Better Secrets management, for Dev / Stage / Prod )
