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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JSON logger option #829

Merged
merged 24 commits into from
Oct 8, 2021
Merged

Add JSON logger option #829

merged 24 commits into from
Oct 8, 2021

Conversation

emmanuelm41
Copy link
Contributor

No description provided.

@@ -63,6 +63,11 @@ var clientMetricsIDFlag = &cli.StringFlag{
Usage: "Unique identifier for the client instance, used by the metrics system.",
}

var jsonFlag = &cli.BoolFlag{
Copy link
Member

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

Copy link
Contributor Author

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 {
Copy link
Member

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?

Copy link
Contributor Author

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.

@willscott willscott merged commit 6a18ad8 into drand:master Oct 8, 2021
@emmanuelm41 emmanuelm41 deleted the json-log branch October 8, 2021 15:30
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

Successfully merging this pull request may close these issues.

None yet

2 participants