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!!
Thanks @Anna Geller. I see that file actually calls some of the functions when it's imported. I'm guessing if I wrap the cli but configure the logger right before doing that, it might work.
I'll try that tomorrow. Thank you!!
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.