grpcutil,log: avoid log spam related to TCP probes#55279
Merged
craig[bot] merged 3 commits intocockroachdb:masterfrom Oct 7, 2020
Merged
grpcutil,log: avoid log spam related to TCP probes#55279craig[bot] merged 3 commits intocockroachdb:masterfrom
craig[bot] merged 3 commits intocockroachdb:masterfrom
Conversation
Member
Prior to this patch, a monitoring probe that would just open and close the TCP port would cause log spam like the following: ``` grpc: Server.Serve failed to complete security handshake from "127.0.0.1:27972": EOF ``` This patch removes it. (This was tested by using netcat: `nc 127.0.0.1 26257` and then Ctrl+C to immediately close the connection.) The patch also cleans up the code around the filtering of grpc log messages. Release note: None Co-authored-by: Aaron Zinger <histocrat+github@gmail.com>
Prior to this patch, log messages from the http package would look like this: ``` E201007 11:15:33.200128 878 httpLoggerserver.go:3088 http: ... ``` Notice how "httpLoggerserver.go" does not correspond to any valid file. With this patch: ``` E201007 11:15:33.200128 878 (gostd) net/http/server.go:3088 http: ... ``` Release note: None
Prior to this patch, a monitoring probe that would just open and close the HTTP port would cause log spam like the following: ``` E201007 11:21:57.101735 882 (gostd) net/http/server.go:3088 http: TLS handshake error from 127.0.0.1:24059: EOF ``` This patch removes it. (This was tested by using netcat: `nc 127.0.0.1 8080` and then Ctrl+C to immediately close the connection.) Release note: None
5ffe1ea to
0f0ad1d
Compare
Contributor
Author
|
cc @HonoreDB for the 2nd and 3rd commit |
tbg
approved these changes
Oct 7, 2020
Member
tbg
left a comment
There was a problem hiding this comment.
Reviewed 3 of 3 files at r1, 2 of 2 files at r2, 1 of 1 files at r3.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @irfansharif and @knz)
pkg/util/log/log_bridge.go, line 29 at r2 (raw file):
// of the file that triggered the logging. func NewStdLogger(severity Severity, prefix string) *stdLog.Logger { if prefix != "" && !strings.HasSuffix(prefix, "/") {
Do we "want" filepath.Separator here or is it / even on windows?
knz
commented
Oct 7, 2020
Contributor
Author
knz
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @irfansharif and @tbg)
pkg/util/log/log_bridge.go, line 29 at r2 (raw file):
Previously, tbg (Tobias Grieger) wrote…
Do we "want"
filepath.Separatorhere or is it/even on windows?
Yes in logging windows uses / too.
Contributor
Author
|
TFYR bors r=tbg |
Contributor
|
Build succeeded: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #32102
See individual commits for details.