1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00

fix logger format (#4474)

Signed-off-by: ShutingZhao <shuting@nirmata.com>
This commit is contained in:
shuting 2022-09-01 15:33:36 +08:00 committed by GitHub
parent 599a68e896
commit 99f6dedb20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -344,12 +344,12 @@ func OverrideRuntimeErrorHandler() {
logger := log.Log.WithName("RuntimeErrorHandler")
if len(runtime.ErrorHandlers) > 0 {
runtime.ErrorHandlers[0] = func(err error) {
logger.V(6).Info("runtime error: %s", err)
logger.V(6).Info("runtime error", "msg", err.Error())
}
} else {
runtime.ErrorHandlers = []func(err error){
func(err error) {
logger.V(6).Info("runtime error: %s", err)
logger.V(6).Info("runtime error", "msg", err.Error())
},
}
}