remove the deep Caller
Showing
1 changed file
with
0 additions
and
3 deletions
| ... | @@ -155,9 +155,6 @@ func (bl *BeeLogger) writerMsg(loglevel int, msg string) error { | ... | @@ -155,9 +155,6 @@ func (bl *BeeLogger) writerMsg(loglevel int, msg string) error { |
| 155 | lm.level = loglevel | 155 | lm.level = loglevel |
| 156 | if bl.enableFuncCallDepth { | 156 | if bl.enableFuncCallDepth { |
| 157 | _, file, line, ok := runtime.Caller(bl.loggerFuncCallDepth + 1) | 157 | _, file, line, ok := runtime.Caller(bl.loggerFuncCallDepth + 1) |
| 158 | if !ok { | ||
| 159 | _, file, line, ok = runtime.Caller(bl.loggerFuncCallDepth) | ||
| 160 | } | ||
| 161 | if ok { | 158 | if ok { |
| 162 | _, filename := path.Split(file) | 159 | _, filename := path.Split(file) |
| 163 | lm.msg = fmt.Sprintf("[%s:%d] %s", filename, line, msg) | 160 | lm.msg = fmt.Sprintf("[%s:%d] %s", filename, line, msg) | ... | ... |
-
Please register or sign in to post a comment