-
Notifications
You must be signed in to change notification settings - Fork 108
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add JSON logger option #829
Conversation
Go version update
cmd/client/main.go
Outdated
@@ -63,6 +63,11 @@ var clientMetricsIDFlag = &cli.StringFlag{ | |||
Usage: "Unique identifier for the client instance, used by the metrics system.", | |||
} | |||
|
|||
var jsonFlag = &cli.BoolFlag{ |
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.
you need to add this to app.Flags
on line 82 if you want it to be usable in this command
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.
Thanks for that! I didn't notice.
|
||
core := zapcore.NewCore(encoder, output, zapcore.Level(level)) | ||
func getConsoleEncoder() zapcore.Encoder { |
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.
json encoder and console encoder here appear to be the same. is there a reason we don't have the getConsoleEconder
return zapcore.NewConsoleEncoder
rather than NewJSONEncoder
?
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.
Thanks again here! I made a mistake.
No description provided.