This commit is contained in:
Yvan
2026-09-04 10:51:45 +08:00
parent d94e2ed225
commit af1e194396
17 changed files with 1015 additions and 61 deletions
+2 -1
View File
@@ -209,7 +209,8 @@ func formatConsoleEntry(entry zapcore.Entry, module string, fields []zapcore.Fie
caller := ""
if entry.Caller.Defined {
caller = filepath.Base(entry.Caller.File) + fmt.Sprintf(":%d", entry.Caller.Line)
callerPath := strings.ReplaceAll(entry.Caller.File, "\\", "/")
caller = filepath.Base(callerPath) + fmt.Sprintf(":%d", entry.Caller.Line)
}
if module == "" {
module = "app"