mirror of https://github.com/knative/pkg.git
Use fallback named logger (#30)
This commit is contained in:
parent
9a6f5abda8
commit
bba99e266c
|
@ -51,10 +51,7 @@ func NewLogger(configJSON string, levelOverride string) (*zap.SugaredLogger, zap
|
|||
if err2 != nil {
|
||||
panic(err2)
|
||||
}
|
||||
|
||||
logger.Error("Failed to parse the logging config. Falling back to default logger.",
|
||||
zap.Error(err), zap.String(logkey.JSONConfig, configJSON))
|
||||
return logger.Sugar(), loggingCfg.Level
|
||||
return logger.Named("fallback-logger").Sugar(), loggingCfg.Level
|
||||
}
|
||||
|
||||
// NewLoggerFromConfig creates a logger using the provided Config
|
||||
|
|
Loading…
Reference in New Issue