mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-17 15:29:03 +08:00
ws update
This commit is contained in:
@@ -148,6 +148,8 @@ func (l *ZapLogger) kvAppend(ctx context.Context, keysAndValues []interface{}) [
|
||||
opUserID := mcontext.GetOpUserID(ctx)
|
||||
connID := mcontext.GetConnID(ctx)
|
||||
triggerID := mcontext.GetTriggerID(ctx)
|
||||
opUserPlatform := mcontext.GetOpUserPlatform(ctx)
|
||||
remoteAddr := mcontext.GetRemoteAddr(ctx)
|
||||
if opUserID != "" {
|
||||
keysAndValues = append([]interface{}{constant.OpUserID, opUserID}, keysAndValues...)
|
||||
}
|
||||
@@ -160,6 +162,12 @@ func (l *ZapLogger) kvAppend(ctx context.Context, keysAndValues []interface{}) [
|
||||
if triggerID != "" {
|
||||
keysAndValues = append([]interface{}{constant.TriggerID, triggerID}, keysAndValues...)
|
||||
}
|
||||
if opUserPlatform != "" {
|
||||
keysAndValues = append([]interface{}{constant.OpUserPlatform, opUserPlatform}, keysAndValues...)
|
||||
}
|
||||
if remoteAddr != "" {
|
||||
keysAndValues = append([]interface{}{constant.RemoteAddr, remoteAddr}, keysAndValues...)
|
||||
}
|
||||
return keysAndValues
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user