-
Notifications
You must be signed in to change notification settings - Fork 86
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
Consider switching to structured logs (slog) #450
Comments
This will also take care of #406. |
Note: slog is available only with Go 1.21, so we'll have to first upgrade to Go 1.21. Alternatively we can use the experimental version for now: |
The way I envision this:
|
#462 with the possible implementation. |
And, it's done. New logs look like this:
We can now export logs in JSON format as well, using the flag
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Go comes with its own structured logger now:
https://pkg.go.dev/log/slog.
We should consider switching to it for generic logging:
cloudprober/logger/logger.go
Line 355 in 2332d30
The text was updated successfully, but these errors were encountered: