-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
etcdmain: configurable 'etcd' binary log-output #6799
Conversation
@@ -139,6 +139,8 @@ logging flags | |||
enable debug-level logging for etcd. | |||
--log-package-levels '' | |||
specify a particular log level for each etcd package (eg: 'etcdmain=CRITICAL,etcdserver=DEBUG'). | |||
--log-output '' | |||
specify 'stdout' or 'stderr' to skip journald logging even when running under init (ppid == 1). |
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.
even when running under systemd
@@ -184,6 +184,7 @@ func newConfig() *config { | |||
// logging | |||
fs.BoolVar(&cfg.Debug, "debug", false, "Enable debug-level logging for etcd.") | |||
fs.StringVar(&cfg.LogPkgLevels, "log-package-levels", "", "Specify a particular log level for each etcd package (eg: 'etcdmain=CRITICAL,etcdserver=DEBUG').") | |||
fs.StringVar(&cfg.LogOutput, "log-output", "", "Specify 'stdout' or 'stderr' to skip journald logging even when running under init (ppid == 1).") |
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.
we do not need to add this to cfg. the main pkg takes care of it anyway.
LGTM. defer to @heyitsanthony |
@@ -184,6 +185,7 @@ func newConfig() *config { | |||
// logging | |||
fs.BoolVar(&cfg.Debug, "debug", false, "Enable debug-level logging for etcd.") | |||
fs.StringVar(&cfg.LogPkgLevels, "log-package-levels", "", "Specify a particular log level for each etcd package (eg: 'etcdmain=CRITICAL,etcdserver=DEBUG').") | |||
fs.StringVar(&cfg.logOutput, "log-output", "", "Specify 'stdout' or 'stderr' to skip journald logging even when running under systemd.") |
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 systemd/journald stuff seems forced, maybe:
fs.StringVar(&cfg.logOutput, "log-output", "default", "Specify a logging target (stdout,stderr,default).")
@heyitsanthony @xiang90 All fixed. |
LGTM |
@heyitsanthony @xiang90
Fix #5449