Check GlobalLevel for existing Zerolog instances #11
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
From the zerolog documentation:
I've found a problem where the echo middleware didn't log requests using an existing zerolog instance because by default the level set in
log
isTraceLevel
here https://github.com/rs/zerolog/blob/master/log.go#L213 which maps tozerolog.NoLevel
orlog.OFF
inlecho
. However, in zerolog we usually use theSetGlobalLevel
to set the log level. One way would be to consider thezerolog.Level
value when calculating the log level https://github.com/ziflex/lecho/blob/master/options.go#L19:The text was updated successfully, but these errors were encountered: