Skip to content

Commit 12b19ff

Browse files
authored
Merge pull request etcd-io#10306 from johncming/zap_logger
embed: set log-outputs 'default' to 'stderr' config when zap mode
2 parents 1124ccf + 6744c57 commit 12b19ff

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Documentation/op-guide/configuration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ The security flags help to [build a secure etcd cluster][security].
339339
+ Specify 'stdout' or 'stderr' to skip journald logging even when running under systemd, or list of comma separated output targets.
340340
+ default: default
341341
+ env variable: ETCD_LOG_OUTPUTS
342+
+ 'default' use 'stderr' config for v3.4 during zap logger migraion
342343

343344
### --debug
344345
+ Drop the default log level to DEBUG for all subpackages.

embed/config_logging.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ func (cfg *Config) setupLogging() error {
152152
for _, v := range cfg.LogOutputs {
153153
switch v {
154154
case DefaultLogOutput:
155-
return errors.New("'--log-outputs=default' is not supported for v3.4 during zap logger migraion (use 'journal', 'stderr', 'stdout', etc.)")
155+
outputPaths[StdErrLogOutput] = struct{}{}
156+
errOutputPaths[StdErrLogOutput] = struct{}{}
156157

157158
case JournalLogOutput:
158159
isJournal = true

0 commit comments

Comments
 (0)