update the log call deep

This commit is contained in:
astaxie 2014-11-03 16:40:08 +08:00
parent 2288ac868c
commit 304beaf89f
1 changed files with 1 additions and 1 deletions

View File

@ -154,7 +154,7 @@ func (bl *BeeLogger) writerMsg(loglevel int, msg string) error {
lm := new(logMsg)
lm.level = loglevel
if bl.enableFuncCallDepth {
_, file, line, ok := runtime.Caller(bl.loggerFuncCallDepth + 1)
_, file, line, ok := runtime.Caller(bl.loggerFuncCallDepth)
if ok {
_, filename := path.Split(file)
lm.msg = fmt.Sprintf("[%s:%d] %s", filename, line, msg)