Skip to content
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

JSON format log output #3246

Closed
1 of 2 tasks
linuswillner opened this issue Feb 25, 2023 · 1 comment · Fixed by #3305
Closed
1 of 2 tasks

JSON format log output #3246

linuswillner opened this issue Feb 25, 2023 · 1 comment · Fixed by #3305

Comments

@linuswillner
Copy link

linuswillner commented Feb 25, 2023

Is your feature request related to a problem? Please elaborate.

Using this bot with log aggregation services like Coralogix is currently less than optimal, because the log outputs are free text and not JSON. This means that, to identify log levels from log messages, we need to regex lines individually, which is brittle and prone to miscategorisation. Multiline log messages, e.g. stack traces, also get interpreted as separate messages, which further exacerbates the miscategorisation issue. For stack traces, this means that most of the stack trace gets incorrectly labelled as info, since it’s not realistically possible to tell a log aggregation service what is and is not part of the stack trace with just regex - or at least it isn't possible with any semblance of reasonable accuracy.

Furthermore, if one has some sort of conditional alert forwarding system, e.g. the one provided by Coralogix, preventing non-actionable issues reported as errors (such as the somewhat frequently recurring “ignoring exception in <something>”) from triggering alerts is also difficult because of this. It can be done, but requires a lot of dancing around specific message wordings to avoid overexclusion and thus losing actually relevant alerts.

Describe the solution you'd like

An optional, or preferably enabled-by-default in production deployments, JSON log output format.

Does your solution involve any of the following?

  • Logviewer
  • New config option

Describe alternatives you've considered

The current free text log output format, which works, but is brittle and suboptimal as detailed previously.

Who will this benefit?

Any users who use log aggregation services, and anyone else who wishes to inspect their Modmail process logs in a structured manner.

Additional Information

No response

@StephenDaDev
Copy link
Member

Implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants