diff --git a/njs-logger/level.go b/njs-logger/level.go index 9ef226b6..bd81657d 100644 --- a/njs-logger/level.go +++ b/njs-logger/level.go @@ -118,6 +118,9 @@ func setViperLogTrace() { return } + jwalterweatherman.SetLogOutput(GetIOWriter(curLevel, "[Log Config Viper]")) + jwalterweatherman.SetStdoutOutput(GetIOWriter(curLevel, "[Std Config Viper]")) + if filetrace { jwalterweatherman.SetStdoutThreshold(jwalterweatherman.LevelTrace) return diff --git a/njs-logger/logger.go b/njs-logger/logger.go index a49c2e5d..42337185 100644 --- a/njs-logger/logger.go +++ b/njs-logger/logger.go @@ -119,7 +119,7 @@ func DisableColor() { // EnableViperLog or not the Gin Logger configuration func EnableViperLog(enable bool) { enableVPR = enable - SetLevel(curLevel) + setViperLogTrace() } func getFrame() runtime.Frame {