mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
fix: log panic
This commit is contained in:
parent
0e8589b068
commit
2faf9698db
@ -213,6 +213,9 @@ func (l *ZapLogger) Error(ctx context.Context, msg string, err error, keysAndVal
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (l *ZapLogger) kvAppend(ctx context.Context, keysAndValues []interface{}) []interface{} {
|
func (l *ZapLogger) kvAppend(ctx context.Context, keysAndValues []interface{}) []interface{} {
|
||||||
|
if ctx == nil {
|
||||||
|
return keysAndValues
|
||||||
|
}
|
||||||
operationID := mcontext.GetOperationID(ctx)
|
operationID := mcontext.GetOperationID(ctx)
|
||||||
opUserID := mcontext.GetOpUserID(ctx)
|
opUserID := mcontext.GetOpUserID(ctx)
|
||||||
connID := mcontext.GetConnID(ctx)
|
connID := mcontext.GetConnID(ctx)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user