From a2428af8a79abe437b6bcef254b218c1a30b8f1c Mon Sep 17 00:00:00 2001 From: astaxie Date: Mon, 3 Nov 2014 16:48:45 +0800 Subject: [PATCH] compatibility for warn & info function add one more depth --- logs/log.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logs/log.go b/logs/log.go index 6251f573..6abfb005 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 _, filename := path.Split(file); filename == "log.go" && line == 97 { + if _, filename := path.Split(file); filename == "log.go" && (line == 97 || line == 83) { _, file, line, ok = runtime.Caller(bl.loggerFuncCallDepth + 1) } if ok {