1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

chore: default logging format to rfc3339 (#9775)

Signed-off-by: ShutingZhao <shuting@nirmata.com>
This commit is contained in:
shuting 2024-02-23 18:01:42 +08:00 committed by GitHub
parent cd023846a7
commit 7a93dcdbc9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -79,7 +79,7 @@ func Setup(logFormat string, loggingTimestampFormat string, level int) error {
case RFC3339NANO:
zc.EncoderConfig.EncodeTime = zapcore.RFC3339NanoTimeEncoder
case "default":
zc.EncoderConfig.EncodeTime = zapcore.EpochNanosTimeEncoder
zc.EncoderConfig.EncodeTime = zapcore.RFC3339TimeEncoder
default:
return errors.New("timestamp format not recognized, pass `iso8601` for ISO8601, `rfc3339` for RFC3339, `rfc3339nano` for RFC3339NANO, `millis` for Epoch Millis, `nanos` for Epoch Nanos, or omit the flag for the Unix Epoch timestamp format")
}