修改日志格式
This commit is contained in:
parent
3a31480df0
commit
cd350b6da4
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -99,7 +99,7 @@ namespace UdpServerCMD
|
||||||
if (i != 0 && i % 2 != 0) stringBuilder.Append(sendStr[i] + " ");
|
if (i != 0 && i % 2 != 0) stringBuilder.Append(sendStr[i] + " ");
|
||||||
else stringBuilder.Append(sendStr[i]);
|
else stringBuilder.Append(sendStr[i]);
|
||||||
}
|
}
|
||||||
log.Info("发送:" + stringBuilder);
|
log.Info("发送至 " + ipEnd.ToString() + ": " + stringBuilder);
|
||||||
|
|
||||||
sendData = hexStringToByteArray(sendStr);
|
sendData = hexStringToByteArray(sendStr);
|
||||||
//发送给指定服务端
|
//发送给指定服务端
|
||||||
|
@ -156,7 +156,7 @@ namespace UdpServerCMD
|
||||||
length = udpServer.ReceiveFrom(data, ref endP);
|
length = udpServer.ReceiveFrom(data, ref endP);
|
||||||
//message = Encoding.Default.GetString(data, 0, length);
|
//message = Encoding.Default.GetString(data, 0, length);
|
||||||
message = byteArrayToHexString(data, length);
|
message = byteArrayToHexString(data, length);
|
||||||
log.Info("接收:" + message);
|
log.Info("接收到 " + endP.ToString() + ": " + message);
|
||||||
message = message.Replace(" ", "");
|
message = message.Replace(" ", "");
|
||||||
InitSocket(endP);
|
InitSocket(endP);
|
||||||
Console.WriteLine("地址:" + endP.ToString() + "\n");
|
Console.WriteLine("地址:" + endP.ToString() + "\n");
|
||||||
|
|
Loading…
Reference in New Issue