Use :logger_handler formatter for JSON #4855
Closed
+255
−12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR switches from
Logger
backends to:logger
handlers.Card: https://3.basecamp.com/5308029/buckets/29267832/card_tables/cards/7610404292
Plan:
:console
backendShould JSON formatter be a library?
Other people might find it useful. I didn't find anything like it at the time of my original implementation (it was all about formatters for backends or backends back then). But maybe there is something out there now. I'll need to check.
UPDATE: Probably not, since a very popular LoggerJSON supports handlers as of 7 months ago.
Would it make sense to switch to it? Right now its "Basic" format is a bit different from what ex_json_logger was using. But seems like it might allow configuration.
LoggerJSON:
ExJsonLogger @ 1.4.0 (currently used):
This PR:
Differences between LoggerJSON and ExJsonLogger:
utc_log
Logger option in ExJsonLogger and this PR)Differences between this PR and LoggerJSON:
Tests
Changelog
Documentation
Dark mode