-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add JSON logging support #3303
Add JSON logging support #3303
Conversation
This adds support for JSON logging, along with the relevant options required. This does not change the default log behaviour, so should be backwards compatible. It is opt in via the LOG_FORMAT option, which can be 'json' to use the new logger, or anything else to fallback to the old behaviour. This is implemented in terms of a custom formatter, which is optionally applied to the stdout stream. The debug stream is unaffected by this.
Cool feature. However, usually PRs should point to |
That's done. Hope I understood what was going on with those commits in development, let me know if I changed / removed any code / functionality! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just pointed up two things there.
Also if new config options were added (stream_log_format
, file_log_format
), it would be better if the help docs for those are also added in core/config_help.json
.
Other than that, you need @Taaku18 to review this thoroughly.
Right, well that's those changes made. Can wait for Taku's review now. |
This adds support for JSON logging, along with the relevant options required.
This does not change the default log behaviour, so should be backwards compatible.
It is opt in via the {STREAM,FILE}_LOG_FORMAT option, which can be 'json' to use the new logger, or anything else to fallback to the old behaviour.
This is implemented in terms of a custom formatter, which is optionally applied to the log streams.
Closes #3246