mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #14146 from SimFG/parse_config
config: Add the default case when failing to parse the log rotate config json
This commit is contained in:
commit
33ba5380df
@ -272,6 +272,8 @@ func setupLogRotation(logOutputs []string, logRotateConfigJSON string) error {
|
|||||||
return fmt.Errorf("improperly formatted log rotation config: %v", err)
|
return fmt.Errorf("improperly formatted log rotation config: %v", err)
|
||||||
case errors.As(err, &unmarshalTypeError):
|
case errors.As(err, &unmarshalTypeError):
|
||||||
return fmt.Errorf("invalid log rotation config: %v", err)
|
return fmt.Errorf("invalid log rotation config: %v", err)
|
||||||
|
default:
|
||||||
|
return fmt.Errorf("fail to unmarshal log rotation config: %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
zap.RegisterSink("rotate", func(u *url.URL) (zap.Sink, error) {
|
zap.RegisterSink("rotate", func(u *url.URL) (zap.Sink, error) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user