mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
embed: improve "--log-outputs" error message, add godoc
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
parent
b0e4fc3974
commit
6d0f71e4c2
@ -469,7 +469,7 @@ func (cfg *Config) setupLogging() error {
|
||||
}
|
||||
|
||||
if len(cfg.LogOutputs) != 1 {
|
||||
fmt.Printf("expected only 1 value in 'log-output', got %v\n", cfg.LogOutputs)
|
||||
fmt.Printf("--logger=capnslog supports only 1 value in '--log-outputs', got %q\n", cfg.LogOutputs)
|
||||
os.Exit(1)
|
||||
}
|
||||
// capnslog initially SetFormatter(NewDefaultFormatter(os.Stderr))
|
||||
@ -596,6 +596,9 @@ func (cfg *Config) setupLogging() error {
|
||||
lvl = zap.NewAtomicLevelAt(zap.DebugLevel)
|
||||
grpc.EnableTracing = true
|
||||
}
|
||||
|
||||
// WARN: do not change field names in encoder config
|
||||
// journald logging writer assumes field names of "level" and "caller"
|
||||
cr := zapcore.NewCore(
|
||||
zapcore.NewJSONEncoder(zap.NewProductionEncoderConfig()),
|
||||
syncer,
|
||||
|
Loading…
x
Reference in New Issue
Block a user