Skip to content

Commit 33ba538

Browse files
authored
Merge pull request #14146 from SimFG/parse_config
config: Add the default case when failing to parse the log rotate config json
2 parents 1da0b01 + 1dcd75f commit 33ba538

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

server/embed/config_logging.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,8 @@ func setupLogRotation(logOutputs []string, logRotateConfigJSON string) error {
272272
return fmt.Errorf("improperly formatted log rotation config: %v", err)
273273
case errors.As(err, &unmarshalTypeError):
274274
return fmt.Errorf("invalid log rotation config: %v", err)
275+
default:
276+
return fmt.Errorf("fail to unmarshal log rotation config: %v", err)
275277
}
276278
}
277279
zap.RegisterSink("rotate", func(u *url.URL) (zap.Sink, error) {

0 commit comments

Comments
 (0)