-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Switch to a structured logger #74
Conversation
@@ -17,7 +18,7 @@ var rootCmd = &cobra.Command{ | |||
headscale is an open source implementation of the Tailscale control server | |||
|
|||
Juan Font Alonso <[email protected]> - 2021 | |||
https://gitlab.com/juanfont/headscale`, | |||
https://github.com/juanfont/headscale`, |
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.
Good catch!
log.Debug(). | ||
Str("handler", "Registration"). | ||
Str("machine", m.Name). | ||
Msg("Client is registered and we have the current NodeKey. All clear to /mSending keepaliveap") |
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.
All clear to /mSending keepaliveap
All clear to /map
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.
This is absolutely awesome. Can you just fix the log message on /map?
Actually, #75 is too important. Going to merge this immediately. |
This PR migrates from the built in Go logger to a structured logger (zerolog).
This allows us to:
Please note, this does not change or override Gin's logger, only the internal one.
example: