-
Notifications
You must be signed in to change notification settings - Fork 111
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
RSDK-801: Change default logger to be pretty (ISO formatted) #1614
Conversation
web/server/entrypoint.go
Outdated
@@ -57,7 +57,7 @@ func RunServer(ctx context.Context, args []string, _ golog.Logger) (err error) { | |||
if argsParsed.Debug { | |||
logConfig = golog.NewDebugLoggerConfig() | |||
} else { | |||
logConfig = golog.NewProductionLoggerConfig() | |||
logConfig = golog.NewDevelopmentLoggerConfig() |
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 addition to changing the timestamp format, this appears to set Development
to true and change the EncodeLevel to zapcore.CapitalColorLevelEncoder
from zapcore.LowercaseLevelEncoder
.
are those safe/desirable changes?
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.
the former change i do not understand, but seems likely undesirable (setting Development: true
to production builds).
the latter i'm fairly confident we do not want. colors are typically implemented via escape codes and will not render correctly in many places.
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.
fair, did a less invasive change - just updates the time encoder to ISO
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.
logs look like this now 2022-11-23T16:32:27.338-0500 info robot_server rpc/server.go:739 stopped cleanly
|
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.
excellent. thank you cheuk
cannot repro the other part, so just fixing this part first