-
Notifications
You must be signed in to change notification settings - Fork 5.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
feat(logging): Implement structured logging #15751
Conversation
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.
This looks great. My only question is around the config option values.
We should introduce a new |
fc9751c
to
70a589b
Compare
Co-authored-by: Thomas Casteleyn <thomas.casteleyn@me.com>
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
Co-authored-by: Thomas Casteleyn <thomas.casteleyn@me.com>
Summary
Structured logging is a machine-readable way of outputting logs and useful when automatically processing the produced logs.
This PR implements a
structured
log-target producing JSON formatted structured logs. It is output to alogfile
, if specified, or tostderr
otherwise similar to the usual text logger. Additionally, the PR deprecates thefile
andstderr
targets and replaces them with atext
target as that's what the output is. The decision to use a file or stderr is the done based on thelogfile
settingChecklist
Related issues
resolves #8815