chore: added debug entry for logs

This commit is contained in:
2026-04-14 10:07:51 +03:00
parent 7e7b910dd3
commit 3295701664
5 changed files with 21 additions and 30 deletions

View File

@@ -28,8 +28,8 @@ public class LiteNetLibServer : LiteNetLibCommunicatorBase, INetworkCommunicator
private void OnConnectionRequest(ConnectionRequest request)
{
logger?.Log(this, $"Connection request from ip {request.RemoteEndPoint}");
logger?.Log(this, $"Current connection count: {Connections.Count}");
ILogger.Shared.LogInfo(this, $"Connection request from ip {request.RemoteEndPoint}");
ILogger.Shared.LogInfo(this, $"Current connection count: {Connections.Count}");
if (Manager.ConnectedPeersCount < MaxConnectionCount)
request.AcceptIfKey(Password);
else
@@ -45,8 +45,8 @@ public class LiteNetLibServer : LiteNetLibCommunicatorBase, INetworkCommunicator
MaxConnectionCount = maxConnectionCount;
Port = port;
logger?.Log(this, $"Starting server on port '{port}' with password '{Password}' and max connection count '{maxConnectionCount}'");
logger?.Log(this, $"Server status: {(Manager.Start(port) ? "Active" : "Failed")}");
ILogger.Shared.LogInfo(this, $"Starting server on port '{port}' with password '{Password}' and max connection count '{maxConnectionCount}'");
ILogger.Shared.LogInfo(this, $"Server status: {(Manager.Start(port) ? "Active" : "Failed")}");
return this;
}