Closed josegonzalez closed 10 months ago
While I do not understand which part of the code adds this argument, this is possible using the log.format
argument.
This can be seen, even with an example for json output, when running the exporter with the help
argument.
Edit: To print logging in json format to the standard output stream, use --log.format="logger:stdout?json=true"
.
Oh thats great. I'll close this then.
Lots of tools are standardizing on
json
logging as it is easy to parse/ship/index. It would be great to add this in addition to the defaultlogfmt
format that is currently in use. A way to do it might be to detect a tty and automatically switch to json if none is detected, or add a flag/env var to control the format.