mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-06-18 00:46:41 +08:00
Merge remote-tracking branch 'origin/errcode' into errcode
This commit is contained in:
commit
ec9ad4a06d
@ -180,11 +180,12 @@ func SetContextInfo(ctx context.Context, funcName string, logLevel logrus.Level,
|
|||||||
funcInfo.Err = err
|
funcInfo.Err = err
|
||||||
funcInfo.LogLevel = logLevel
|
funcInfo.LogLevel = logLevel
|
||||||
_, file, line, _ := runtime.Caller(0)
|
_, file, line, _ := runtime.Caller(0)
|
||||||
|
var s string
|
||||||
i := strings.SplitAfter(file, "/")
|
i := strings.SplitAfter(file, "/")
|
||||||
if len(i) > 3 {
|
if len(i) > 3 {
|
||||||
file = i[len(i)-3] + i[len(i)-2] + i[len(i)-1] + ":" + utils.IntToString(line)
|
file = i[len(i)-3] + i[len(i)-2] + i[len(i)-1] + ":" + utils.IntToString(line)
|
||||||
}
|
}
|
||||||
funcInfo.File = file
|
funcInfo.File = s
|
||||||
*t.Funcs = append(*t.Funcs, funcInfo)
|
*t.Funcs = append(*t.Funcs, funcInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user