From f22c7c80c118d5cacf08eefc35c8f60c91ff953f Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Mon, 26 Aug 2019 22:45:48 -0700 Subject: [PATCH] embed: fix "--log-outputs" setup without "stderr" Signed-off-by: Gyuho Lee --- embed/config_logging.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/embed/config_logging.go b/embed/config_logging.go index e617dfe82..583f343d1 100644 --- a/embed/config_logging.go +++ b/embed/config_logging.go @@ -170,7 +170,10 @@ func (cfg *Config) setupLogging() error { } if !isJournal { - copied := logutil.AddOutputPaths(logutil.DefaultZapLoggerConfig, outputPaths, errOutputPaths) + copied := logutil.DefaultZapLoggerConfig + copied.OutputPaths = outputPaths + copied.ErrorOutputPaths = errOutputPaths + copied = logutil.MergeOutputPaths(copied) copied.Level = zap.NewAtomicLevelAt(logutil.ConvertToZapLevel(cfg.LogLevel)) if cfg.Debug || cfg.LogLevel == "debug" { // enable tracing even when "--debug --log-level info"