mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-06-03 06:01:30 +08:00
log
This commit is contained in:
parent
6c7b80f853
commit
e67dc28e82
@ -180,11 +180,12 @@ func SetContextInfo(ctx context.Context, funcName string, logLevel logrus.Level,
|
||||
funcInfo.Err = err
|
||||
funcInfo.LogLevel = logLevel
|
||||
_, file, line, _ := runtime.Caller(0)
|
||||
var s string
|
||||
i := strings.SplitAfter(file, "/")
|
||||
if len(i) > 3 {
|
||||
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)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user