Show only filename (not full path) in debug log caller info

This commit is contained in:
Jeffrey Paul 2025-12-17 16:21:06 -08:00
parent 1e81801036
commit 1d37dd9748

View File

@ -4,6 +4,7 @@ import (
"fmt" "fmt"
"io" "io"
"os" "os"
"path/filepath"
"runtime" "runtime"
"sync" "sync"
@ -207,7 +208,7 @@ func DebugReal(arg string, cs int) {
if !ok { if !ok {
return return
} }
tag := fmt.Sprintf("%s:%d: ", callerFile, callerLine) tag := fmt.Sprintf("%s:%d: ", filepath.Base(callerFile), callerLine)
log.Debug(tag + arg) log.Debug(tag + arg)
} }