@@ -25,8 +25,9 @@ public static class MessageObjectLoggerHelper
2525 /// <param name="operationType">操作类型</param>
2626 /// <param name="uniqueId">唯一标识ID</param>
2727 /// <param name="messageObject">网络消息对象</param>
28+ /// <param name="actorId"></param>
2829 /// <returns>格式化后的消息字符串</returns>
29- public static string FormatMessage ( int messageId , MessageOperationType operationType , int uniqueId , INetworkMessage messageObject )
30+ public static string FormatMessage ( int messageId , MessageOperationType operationType , int uniqueId , INetworkMessage messageObject , long actorId )
3031 {
3132 try
3233 {
@@ -49,6 +50,8 @@ public static string FormatMessage(int messageId, MessageOperationType operation
4950 stringBuilder . Append ( $ "--UniqueId:[{ uniqueId . ToString ( ) . CenterAlignedText ( 13 ) } ]---") ;
5051 // 消息的内容 分割
5152 stringBuilder . AppendLine ( ) ;
53+ // 消息的ActorId内容
54+ stringBuilder . AppendLine ( actorId . ToString ( ) . CenterAlignedText ( 140 ) ) ;
5255 // 消息内容
5356 stringBuilder . AppendLine ( $ "{ messageObject . ToJsonString ( ) } ") ;
5457 // 向上的箭头
@@ -59,7 +62,7 @@ public static string FormatMessage(int messageId, MessageOperationType operation
5962 }
6063
6164 // 非控制台输出模式下,将消息序列化为JSON格式
62- var messageObjectLogObject = new MessageObjectLogObject ( messageObject . GetType ( ) . Name , messageId , operationType , uniqueId , messageObject ) ;
65+ var messageObjectLogObject = new MessageObjectLogObject ( messageObject . GetType ( ) . Name , messageId , operationType , uniqueId , messageObject , actorId ) ;
6366 var json = JsonHelper . Serialize ( messageObjectLogObject ) ;
6467 return json ;
6568 }
0 commit comments