From 1d37dd974853fa0ec935feb8ed8f66f0f9bd1464 Mon Sep 17 00:00:00 2001 From: sneak Date: Wed, 17 Dec 2025 16:21:06 -0800 Subject: [PATCH] Show only filename (not full path) in debug log caller info --- internal/log/log.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/log/log.go b/internal/log/log.go index 7f9364b..0dfb1b8 100644 --- a/internal/log/log.go +++ b/internal/log/log.go @@ -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) }