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

Feature request: Log levels, log file UTC timestamps and logfmt formatting #68

Open
robinsmidsrod opened this issue Oct 1, 2023 · 0 comments

Comments

@robinsmidsrod
Copy link

While working with the log file, I've noticed that it has some things that could be improved.

Would it be possible to implement log levels, so that you can e.g. only see warnings and errors instead of everything?

Would it be possible to use ISO8601 UTC timestamps (e.g. 2023-10-01T13:23:05.156Z) instead of local time? It's so much better if you're ingesting the log into a log aggregator. Another benefit is that they're always fixed width.

Is it possible to use logfmt formatting instead of the custom log format you're using now? That is semi-structured format that is easy to read and has a defined syntax. It also makes it easier to handle multi-line messages, as you can use a separate key in the log line to indicate which part of the log line you're outputting (if multiple lines). With this in place you don't need to make your JSON dumps a single line, or you can make compacting them an option for those that prefer it.

Example: line=2/5 msg="This is my partial log line"

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

No branches or pull requests

1 participant