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

chore(log): add caller (#10874)

Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
This commit is contained in:
Khaled Emara 2024-08-16 17:08:55 +03:00 committed by GitHub
parent 06ffd1c961
commit a5915a310b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -62,7 +62,7 @@ func Setup(logFormat string, loggingTimestampFormat string, level int) error {
case TextFormat: case TextFormat:
output := zerolog.ConsoleWriter{Out: os.Stderr} output := zerolog.ConsoleWriter{Out: os.Stderr}
output.TimeFormat = resolveTimestampFormat(loggingTimestampFormat) output.TimeFormat = resolveTimestampFormat(loggingTimestampFormat)
logger = zerolog.New(output).With().Timestamp().Logger() logger = zerolog.New(output).With().Timestamp().Caller().Logger()
case JSONFormat: case JSONFormat:
logger = zerolog.New(os.Stderr).With().Timestamp().Logger() logger = zerolog.New(os.Stderr).With().Timestamp().Logger()
default: default: