1
0
Fork 0
mirror of https://github.com/sbrl/Nibriboard.git synced 2018-01-10 21:33:49 +00:00

[server] Add logging

This commit is contained in:
Starbeamrainbowlabs 2017-09-30 19:57:40 +01:00
parent a5adb30364
commit 4786347e7e
3 changed files with 8 additions and 3 deletions

View file

@ -59,7 +59,10 @@ namespace Nibriboard
{
NibriClient client = new NibriClient(this, eventArgs.ConnectingClient);
client.Disconnected += (NibriClient disconnectedClient) => NibriClients.Remove(disconnectedClient);
client.Disconnected += (NibriClient disconnectedClient) => {
NibriClients.Remove(disconnectedClient);
Log.WriteLine("[NibriClient/#{1}] Client disconnected and removed from active clients list.");
};
NibriClients.Add(client);
return Task.CompletedTask;
@ -67,6 +70,8 @@ namespace Nibriboard
public override Task HandleClientDisconnected(object sender, ClientDisconnectedEventArgs eventArgs)
{
// We can't use this to remove the NibriClient from the list since we don't know which
// NibriClient objects wrap which WebsocketClient instances
return Task.CompletedTask;
}

View file

@ -205,7 +205,7 @@ namespace Nibriboard.RippleSpace
public async Task AddLine(DrawnLine newLine)
{
if(newLine.Points.Count == 0) {
Log.WriteLine("[Plane/{0}] Lines that don't contain any points can't be added to a chunk!");
Log.WriteLine("[Plane/{0}] Lines that don't contain any points can't be added to a chunk!", Name);
return;
}
List<DrawnLine> chunkedLineParts;

@ -1 +1 @@
Subproject commit 8ce983489be64fd298d3e847711ca4a38bb7d429
Subproject commit 607dbb9bb3ebd3f8e29015fe1a84bf1a2cd511ed