William Grim
10/29/2021, 8:14 AMPREFECT__LOGGING__FORMAT
to be a JSON-style string, and I've set PREFECT__LOGGING__EXTRA_LOGGERS
to capture logging from various libraries as well.
The issue is the %(message)s
strings that get sent to loggers often come back from libraries and things in a format that is not JSON-compatible. For example, they will have double-quotes in them that are not escaped, and I want to catch these so I can pass everything to json.JSONEncoder().encode(msg)
first.
Is there a way to do this? Even if I need to write a different "main" method that sets up an agent for me, I'm willing to do that. I just need to know how/where to setup the hooks.
Much appreciated for any information in advance!!Anna Geller
William Grim
10/29/2021, 9:08 AM