-
Notifications
You must be signed in to change notification settings - Fork 35
Make logging levels compliant to APM spec #174
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
Conversation
Custom Zap-based Level LoggerThe technical possibilities to modify the
Changes
|
I may be mistaken, but I don't think this is necessary. Are you aware of a spec that requires that With that in mind, can we simplify this PR a bit? Can we just translate |
@axw Thanks for taking a look! I believe that the reasoning behind having the same values for However I agree with you, the PR could be simplified by a lot if we decide that this incentive is not worth having a 1:1 mapping. |
@jlvoiseux If we use |
@axw I have implemented your recommendations. Zap is now used natively. The mapping is now as follows:
Mapping |
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.
Thanks for the changes, it looks a lot more straightforward to me now.
The mapping looks good except for critical and off - I think off should really mean off.
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.
LGTM, thanks for the changes!
Motivation / Summary
This PR aims to resolve #170. The spec'd log level are now mapped on the default Logrus levels. This PR is still in draft, as I need to figure out a way to replace the
fatal
log level bycritical
in the output logs.Right now
ELASTIC_APM_LOG_LEVEL=critical
is supported but will map tofatal
, which will result in outputs such as the one shown below:That is not ideal in terms of UX: a user who sets the log level to critical might want to see
"log.level":"critical"
for the relevant logs. This PR is in draft while I figure out a way to implement the aforementioned behavior.