JSON logging - #5023
Conversation
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #5023 +/- ##
=============================================
+ Coverage 64.16% 64.32% +0.15%
- Complexity 13723 13803 +80
=============================================
Files 1687 1689 +2
Lines 66741 66771 +30
Branches 7188 7189 +1
=============================================
+ Hits 42826 42949 +123
+ Misses 21516 21417 -99
- Partials 2399 2405 +6 see 63 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Note that according to Wikipedia ISO 8601 specifies no maximum number of fractional digits, some widely used implementations limit the number of fractions:
I'm not sure if these limitations are worth reducing the precision of OTP's logs. On the other hand, the 9th fractional digit has limited value anyways. |
|
You're right in that nobody needs that ridiculous level of precision however, there is value in just using the default configuration (which this is) and not fiddle it. |
|
It is probably not necessary to add the Entur configuration, we use already different versions of it, so we need to customize it anyway. |
11083c9 to
50edb0b
Compare
50edb0b to
72ce024
Compare
vpaturet
left a comment
There was a problem hiding this comment.
Tested successfully with the Entur configuration by overriding the embedded logback configuration file with an external configuration file.
Co-authored-by: Johan Torin <jtorin@users.noreply.github.com>
|
Looks good to me, but I will leave the formal reviews to the assigned reviewers. |
Summary
This allows users of OTP to switch to JSON-formatted logs by setting an command line parameter like this:
A (pretty-printed) example of a log message looks like this:
I've also included Entur's configuration in this PR. We can discuss if this is necessary as you may have more customization needs that you don't want to upstream.
Issue
Closes #5015
Documentation
Added.
cc @derhuerst @hbruch