From 2288ac868c49cadb170fb8876e14a2a188001d96 Mon Sep 17 00:00:00 2001 From: astaxie Date: Mon, 3 Nov 2014 16:34:36 +0800 Subject: [PATCH] remove the deep Caller --- logs/log.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/logs/log.go b/logs/log.go index b61388e6..d24e21d2 100644 --- a/logs/log.go +++ b/logs/log.go @@ -155,9 +155,6 @@ func (bl *BeeLogger) writerMsg(loglevel int, msg string) error { lm.level = loglevel if bl.enableFuncCallDepth { _, file, line, ok := runtime.Caller(bl.loggerFuncCallDepth + 1) - if !ok { - _, file, line, ok = runtime.Caller(bl.loggerFuncCallDepth) - } if ok { _, filename := path.Split(file) lm.msg = fmt.Sprintf("[%s:%d] %s", filename, line, msg)