Skip to content

Commit 8680d80

Browse files
fix logging output
1 parent f722c33 commit 8680d80

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

2_Libs/Networking/UdpReceiver/Receiver.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public async Task RunAsync()
3434
if (_groupAddress != null)
3535
{
3636
client.JoinMulticastGroup(IPAddress.Parse(_groupAddress));
37-
_logger.LogInformation("joining the multicast group {0}", IPAddress.Parse(_groupAddress));
37+
_logger.LogInformation("joining the multicast group {address}", IPAddress.Parse(_groupAddress));
3838
}
3939

4040
bool completed = false;
@@ -44,7 +44,7 @@ public async Task RunAsync()
4444
UdpReceiveResult result = await client.ReceiveAsync();
4545
byte[] datagram = result.Buffer;
4646
string dataReceived = Encoding.UTF8.GetString(datagram);
47-
_logger.LogInformation("Received {0} from {1}", dataReceived, result.RemoteEndPoint);
47+
_logger.LogInformation("Received {data} from {endpoint}", dataReceived, result.RemoteEndPoint);
4848
if (dataReceived.Equals("bye", StringComparison.CurrentCultureIgnoreCase))
4949
{
5050
completed = true;
@@ -58,4 +58,3 @@ public async Task RunAsync()
5858
}
5959
}
6060
}
61-

0 commit comments

Comments
 (0)