disable stack trace in debug

master v0.0.6
Evan Chen 2021-11-07 18:49:54 +08:00
parent 31689a002d
commit 2bbc6ae9ff
1 changed files with 5 additions and 4 deletions

9
log.go
View File

@ -115,10 +115,11 @@ func (l *Logger) output(lev Llevel, depth int, fields H, v ...interface{}) {
if !PROD { if !PROD {
data.Stack = stack() data.Stack = stack()
} }
case Ldebug: // disable stack trace on debug
if !PROD { // case Ldebug:
data.Stack = stack() // if !PROD {
} // data.Stack = stack()
// }
} }
lock.Lock() lock.Lock()
defer lock.Unlock() defer lock.Unlock()