mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 23:01:28 +00:00
compatibility for warn & info function add one more depth
This commit is contained in:
parent
90a7ce5c6a
commit
a2428af8a7
@ -155,7 +155,7 @@ func (bl *BeeLogger) writerMsg(loglevel int, msg string) error {
|
|||||||
lm.level = loglevel
|
lm.level = loglevel
|
||||||
if bl.enableFuncCallDepth {
|
if bl.enableFuncCallDepth {
|
||||||
_, file, line, ok := runtime.Caller(bl.loggerFuncCallDepth)
|
_, 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)
|
_, file, line, ok = runtime.Caller(bl.loggerFuncCallDepth + 1)
|
||||||
}
|
}
|
||||||
if ok {
|
if ok {
|
||||||
|
Loading…
Reference in New Issue
Block a user