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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: discard only info when --debug=false, add "--debug" grpc-proxy start #8994

Merged
merged 3 commits into from
Dec 21, 2017

Conversation

gyuho
Copy link
Contributor

@gyuho gyuho commented Dec 8, 2017

Fix #8983.

@gyuho gyuho requested a review from xiang90 December 8, 2017 23:48
capnslog.SetGlobalLogLevel(capnslog.DEBUG)
grpc.EnableTracing = true
} else {
grpclog.SetLoggerV2(grpclog.NewLoggerV2(ioutil.Discard, ioutil.Discard, ioutil.Discard))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, we should still return gRPC loggings whose level >= Error.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xiang90 Turns out grpc uses leveled log only in the transport package. Everywhere else logs with grpclog.Infof/Warningf/..., which means we need either disable them all or print them all including verbose internal balancer logs. There's no way to print only errors.

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
@gyuho gyuho changed the title grpc-proxy: add "--debug" flag to "etcd grpc-proxy start" command *: discard only info when --debug=false, add "--debug" grpc-proxy start Dec 21, 2017
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
@gyuho
Copy link
Contributor Author

gyuho commented Dec 21, 2017

@xiang90 PTAL. Now only discards info level.

@xiang90
Copy link
Contributor

xiang90 commented Dec 21, 2017

lgtm

@gyuho gyuho removed the WIP label Dec 21, 2017
@gyuho gyuho merged commit 3dd1c1b into etcd-io:master Dec 21, 2017
@gyuho gyuho deleted the grpc-proxy-log branch December 21, 2017 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants