Merge pull request #10306 from johncming/zap_logger

embed: set log-outputs 'default' to 'stderr' config when zap mode
release-3.4
Gyuho Lee 2018-12-05 18:25:43 -08:00 committed by GitHub
commit 12b19ff5ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -339,6 +339,7 @@ The security flags help to [build a secure etcd cluster][security].
+ Specify 'stdout' or 'stderr' to skip journald logging even when running under systemd, or list of comma separated output targets.
+ default: default
+ env variable: ETCD_LOG_OUTPUTS
+ 'default' use 'stderr' config for v3.4 during zap logger migraion
### --debug
+ Drop the default log level to DEBUG for all subpackages.

View File

@ -152,7 +152,8 @@ func (cfg *Config) setupLogging() error {
for _, v := range cfg.LogOutputs {
switch v {
case DefaultLogOutput:
return errors.New("'--log-outputs=default' is not supported for v3.4 during zap logger migraion (use 'journal', 'stderr', 'stdout', etc.)")
outputPaths[StdErrLogOutput] = struct{}{}
errOutputPaths[StdErrLogOutput] = struct{}{}
case JournalLogOutput:
isJournal = true