-
Notifications
You must be signed in to change notification settings - Fork 22
Switch human logger from JSON to logfmt #170
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
Conversation
This format is consistent with Go's new official `slog`, `zerolog` and many others. It is also far more readable than JSON, and a growing number of libaries and tools are able to parse it.
489613f
to
7441aa7
Compare
The lack of syntax highlighting makes me really sad :( |
i just upgraded deps and was surprised at this change, which led me here. just noting that for me, JSON as a slog field is no longer readable. Old: New: anyway, we can just peg to old version, or is there a config to switch to JSON again @nhooyr ? |
@alixander just peg to old version. This change wasn't made in consultation with me. I disagree with it. |
@alixander and @nhooyr — sorry for the abrupt merge, I should've kept this open for longer. This raises a good moment to discuss the future of this project. Is the lack of JSON highlighting your main issue with the change, or is Coder's general goal of moving towards stdlib slog against your's? |
Could we just have different sloggers for the old human fmt and logfmt? |
I'd prefer @coadler's suggestion for now. If this new slogger came in a different package that's cool, I'm not opposed to more options and supporting stdlib slog seems like a good idea on the face of it. I'm not too familiar with the stlib slog. I'm in Ontario right now visiting my ailing mum. I don't have the time right now to look into it or the issue you made at coder/coder#7451. When I get back to Kaslo I'll look into it. |
new:

old:

cc @nhooyr, see coder/coder#7451 for context.