-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Follow-up improvements from #2060 #2088
Follow-up improvements from #2060 #2088
Conversation
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.
lgtm, but I really think the repetition of grpclog is unnecessary. We already initialize the Zap logged in Service, we should do the same for grpclog (and perhaps in the future change it to go through Zap instead of going directly to stdout).
cmd/agent/main.go
Outdated
@@ -50,6 +52,7 @@ func main() { | |||
return err | |||
} | |||
logger := svc.Logger // shortcut | |||
grpclog.SetLoggerV2(grpclog.NewLoggerV2(ioutil.Discard, os.Stderr, os.Stderr)) |
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.
why not do it somewhere in svc
?
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.
In fact, looks like it's there already!
Lines 96 to 100 in e631338
grpcZap.ReplaceGrpcLogger(logger.WithOptions( | |
// grpclog is not consistent with the depth of call tree before it's dispatched to zap, | |
// but Skip(2) still shows grpclog as caller, while Skip(3) shows actual grpc packages. | |
zap.AddCallerSkip(3), | |
)) |
Just need to remove it from the mains then.
Codecov Report
@@ Coverage Diff @@
## master #2088 +/- ##
==========================================
- Coverage 96.33% 96.29% -0.04%
==========================================
Files 214 214
Lines 10537 10535 -2
==========================================
- Hits 10151 10145 -6
- Misses 328 331 +3
- Partials 58 59 +1
Continue to review full report at Codecov.
|
The Cassandra integration test is failing, but isn't apparently related to this PR. Master was showing the build as passing, but it failed with the same reason once I started the job again: |
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.
Cassandra issues should be fixed in master
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
Signed-off-by: Juraci Paixão Kröhling juraci@kroehling.de
Which problem is this PR solving?