logging: Actually use level_key (#4189)

This commit is contained in:
Francis Lavoie 2021-06-04 16:15:43 -04:00 committed by GitHub
parent 7b500e74b4
commit 94b712009a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -264,6 +264,9 @@ func (lec *LogEncoderConfig) ZapcoreEncoderConfig() zapcore.EncoderConfig {
if lec.MessageKey != nil { if lec.MessageKey != nil {
cfg.MessageKey = *lec.MessageKey cfg.MessageKey = *lec.MessageKey
} }
if lec.LevelKey != nil {
cfg.LevelKey = *lec.LevelKey
}
if lec.TimeKey != nil { if lec.TimeKey != nil {
cfg.TimeKey = *lec.TimeKey cfg.TimeKey = *lec.TimeKey
} }