fixed log call depth.

This commit is contained in:
boyce
2019-03-27 14:24:08 +08:00
parent a854355952
commit 9cfee6695e
2 changed files with 1 additions and 40 deletions

View File

@@ -113,7 +113,7 @@ func (slf *LogModule) Printf(level uint, format string, v ...interface{}) {
var file string
var line int
var ok bool
_, file, line, ok = runtime.Caller(3)
_, file, line, ok = runtime.Caller(slf.calldepth - 1)
if !ok {
file = "???"
line = 0