diff --git a/logs/log.go b/logs/log.go index 89574769..6251f573 100644 --- a/logs/log.go +++ b/logs/log.go @@ -155,7 +155,7 @@ func (bl *BeeLogger) writerMsg(loglevel int, msg string) error { lm.level = loglevel if bl.enableFuncCallDepth { _, file, line, ok := runtime.Caller(bl.loggerFuncCallDepth) - if file == "log.go" && line == 97 { + if _, filename := path.Split(file); filename == "log.go" && line == 97 { _, file, line, ok = runtime.Caller(bl.loggerFuncCallDepth + 1) } if ok {