Skip to content

Commit

Permalink
Fix viper log
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas JUHEL committed Apr 16, 2020
1 parent 4107c04 commit ac0339c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions njs-logger/level.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion njs-logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ac0339c

Please sign in to comment.