mirror of
https://github.com/nabbar/golib.git
synced 2025-12-24 11:51:02 +08:00
Fix viper log
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user