mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
embed: error when different values are specified in "--log-output"
"--log-output default,a.log" should error out when etcd runs as a systemd unit. We expect 'default' to be overridden explicitly. Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
parent
755b508a8e
commit
b6578c8f4d
@ -581,6 +581,14 @@ func (cfg *Config) setupLogging() error {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
if len(cfg.LogOutputs) > 1 {
|
||||
for _, v := range cfg.LogOutputs {
|
||||
if v != DefaultLogOutput {
|
||||
return fmt.Errorf("running as a systemd unit but other '--log-output' values (%q) are configured with 'default'; override 'default' value with something else", cfg.LogOutputs)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// use stderr as fallback
|
||||
syncer := getZapWriteSyncer()
|
||||
lvl := zap.NewAtomicLevelAt(zap.InfoLevel)
|
||||
|
Loading…
x
Reference in New Issue
Block a user