-
Notifications
You must be signed in to change notification settings - Fork 356
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
chore: improve master logging #2295
Conversation
@stoksc Not sure offhand if it is okay to create multiple logrus loggers... |
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
from an example in the logrus docs (this page https://pkg.go.dev/github.com/sirupsen/logrus#readme-example):
I just assumed, based on the thinking |
|
bbb4da1
to
3bc7a8e
Compare
@@ -26,22 +26,25 @@ const jsonPretty = "application/json+pretty" | |||
|
|||
// NewGRPCServer creates a Determined gRPC service. | |||
func NewGRPCServer(db *db.PgDB, srv proto.DeterminedServer) *grpc.Server { | |||
logger := logrus.NewEntry(logrus.StandardLogger()) | |||
logger := logrus.New() |
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.
I spent some time reading the logrus code - afaict it seems totally fine to have two logrus loggers but I'm always happy to be surprised..
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.
Yep, that is my reading as well -- assuming the underlying io.Writer
is safe to write to concurrently, which I think should be the case here with os.Stderr
.
Two main changes: * Reduce gRPC log level from INFO to WARN. gRPC INFO log messages are almost universally about cryptic implementation details, such as pickfirstBalancer: HandleSubConnStateChange: 0xc0006a2010, {READY <nil>} * Squelch a log message ("initializing endpoints for agents") that does not seem useful. Along the way, fix various typos and improve log message consistency.
3bc7a8e
to
972a8ac
Compare
Two main changes:
Reduce gRPC log level from INFO to WARN. gRPC INFO log messages are
almost universally about cryptic implementation details, such as
pickfirstBalancer: HandleSubConnStateChange: 0xc0006a2010, {READY }
Squelch a log message ("initializing endpoints for agents") that does
not seem useful.
Along the way, fix various typos and improve log message consistency.
Description
Test Plan
Commentary (optional)
Checklist
docs/release-notes/
.See Release Note for details.