So Docker captures logs to stdout/stderr. It can format them as json by providing json-file
(link) as the logging driver type. Unfortunately, it logs things like this:
This double escaped json is not ideal. At Subconscious Networks, our systems also happen to use Google’s ops agent which will do log munging. Unfortunately, it doesn’t seem to have a facility to say “unescape the json at location X”.
There’s a seemingly undocumented feature of ops agent where you can parse a specific field like this:
Unfortunately, you can’t maintain the docker json wrapper, due to a bug in their implementation.