Show only filename (not full path) in debug log caller info
This commit is contained in:
parent
1e81801036
commit
1d37dd9748
@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"sync"
|
||||
|
||||
@ -207,7 +208,7 @@ func DebugReal(arg string, cs int) {
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
tag := fmt.Sprintf("%s:%d: ", callerFile, callerLine)
|
||||
tag := fmt.Sprintf("%s:%d: ", filepath.Base(callerFile), callerLine)
|
||||
log.Debug(tag + arg)
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user