-
Notifications
You must be signed in to change notification settings - Fork 163
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
log: Clean log package & move config to log package #3677
log: Clean log package & move config to log package #3677
Conversation
Cleans up the public API of the log package and moves the log config from env to the log package. Breaking: this commit changes the config format to snake_case. Furthermore the APIs change: - The toml key for logging config is changed from `logging` to `log` - `env.SetupLogging` is replaced by `log.Setup` - `env.Logging` is replaced by `log.Config` - `util.GetDebugID()` is now `log.NewDebugID()` - `log.RandId()` is removed and `log.NewDebugID()` should be used instead - The log packages no longer provides flag setup, whoever wants to use flags should define them in main. Fixes scionproto#3594
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.
Reviewed 100 of 100 files at r1, 1 of 5 files at r2.
Reviewable status: 97 of 101 files reviewed, 1 unresolved discussion (waiting on @karampok and @lukedirtwalker)
go/lib/log/logtest/config.go, line 1 at r1 (raw file):
// Copyright 2019 Anapaya Systems
2020
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.
Reviewable status: 97 of 101 files reviewed, 1 unresolved discussion (waiting on @karampok)
go/lib/log/logtest/config.go, line 1 at r1 (raw file):
Previously, karampok (Konstantinos) wrote…
2020
Done.
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.
Reviewed 4 of 5 files at r2, 1 of 1 files at r3.
Reviewable status:complete! all files reviewed, all discussions resolved
Cleans up the public API of the log package and moves the log config from env to the log package. Breaking: this commit changes the config format to snake_case. Furthermore the APIs change: - The toml key for logging config is changed from `logging` to `log` - `env.SetupLogging` is replaced by `log.Setup` - `env.Logging` is replaced by `log.Config` - `util.GetDebugID()` is now `log.NewDebugID()` - `log.RandId()` is removed and `log.NewDebugID()` should be used instead - The log packages no longer provides flag setup, whoever wants to use flags should define them in main. Fixes scionproto#3594
Cleans up the public API of the log package and
moves the log config from env to the log package.
Breaking: this commit changes the config format to snake_case.
Furthermore the APIs change:
logging
tolog
env.SetupLogging
is replaced bylog.Setup
env.Logging
is replaced bylog.Config
util.GetDebugID()
is nowlog.NewDebugID()
log.RandId()
is removed andlog.NewDebugID()
should be used insteadFixes #3594
This change is