-
-
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 #3305
Merged
Taaku18
merged 9 commits into
modmail-dev:development
from
nullishamy:feat/json-logging
Nov 19, 2023
Merged
Add JSON logging support #3305
Taaku18
merged 9 commits into
modmail-dev:development
from
nullishamy:feat/json-logging
Nov 19, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
I actually don't know what the hell is going on here. I'm not closing these willfully. Going to report to GitHub if this happens again?? |
Reporting this. |
Taaku18
approved these changes
Nov 19, 2023
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 commits, looks good!
Merged
raidensakura
pushed a commit
to raidensakura/modmail
that referenced
this pull request
Apr 10, 2024
* Add JSON logging support 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. * Allow JSON to be selected when creating handlers * Allow different formats to be selected for streams/files * Remove old / unused code * Add new config opts to helpfile * Formatting, basic typing and reorder for consistency in project. --------- Co-authored-by: Jerrie-Aries <[email protected]> Co-authored-by: Taku <[email protected]>
raidensakura
added a commit
to raidensakura/modmail
that referenced
this pull request
Apr 21, 2024
raidensakura
added a commit
to raidensakura/modmail
that referenced
this pull request
Apr 21, 2024
khakers
pushed a commit
to khakers/OpenModmail
that referenced
this pull request
Jun 18, 2024
* Add JSON logging support 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. * Allow JSON to be selected when creating handlers * Allow different formats to be selected for streams/files * Remove old / unused code * Add new config opts to helpfile * Formatting, basic typing and reorder for consistency in project. --------- Co-authored-by: Jerrie-Aries <[email protected]> Co-authored-by: Taku <[email protected]> (cherry picked from commit 6d61cf2) Signed-off-by: Khakers <[email protected]>
khakers
pushed a commit
to khakers/OpenModmail
that referenced
this pull request
Jun 18, 2024
* Add JSON logging support 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. * Allow JSON to be selected when creating handlers * Allow different formats to be selected for streams/files * Remove old / unused code * Add new config opts to helpfile * Formatting, basic typing and reorder for consistency in project. --------- Co-authored-by: Jerrie-Aries <[email protected]> Co-authored-by: Taku <[email protected]> (cherry picked from commit 6d61cf2) Signed-off-by: Khakers <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 is a re-open of #3303, which got closed for some reason (not sure if the UI bugged, if I misclicked, or something else)
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