mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-10 12:05:58 +08:00
log
This commit is contained in:
@@ -34,11 +34,13 @@ func SetOperationID(ctx context.Context, operationID string) {
|
||||
}
|
||||
|
||||
func GetOperationID(ctx context.Context) string {
|
||||
f, ok := ctx.Value(TraceLogKey).(*FuncInfos)
|
||||
if ok {
|
||||
return f.OperationID
|
||||
if ctx.Value(TraceLogKey) != nil {
|
||||
f, ok := ctx.Value(TraceLogKey).(*FuncInfos)
|
||||
if ok {
|
||||
return f.OperationID
|
||||
}
|
||||
}
|
||||
return utils.GetFuncName(1)
|
||||
return utils.GetFuncName(2)
|
||||
}
|
||||
|
||||
func GetOpUserID(ctx context.Context) string {
|
||||
|
||||
Reference in New Issue
Block a user