Skip to content

Commit

Permalink
Add join game log
Browse files Browse the repository at this point in the history
  • Loading branch information
NikoCat233 committed Apr 25, 2024
1 parent 9faf5fa commit 843039b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Impostor.Server/Net/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,15 @@ public override async ValueTask HandleMessageAsync(IMessageReader reader, Messag
break;
}

if (result.Error is not GameJoinError.None)
{
_logger.LogInformation("Client ({0}){1}({2}) failed to join game {3} with error {4}.", Id, Name, Connection.EndPoint.Address.ToString(), gameCode, result.Error);
if (result.Error is GameJoinError.Custom)
{
_logger.LogInformation("Client {0} Custom Error : {1}", Id, result.Message!.Replace("\n", "\\n"));
}
}

break;
}

Expand Down

0 comments on commit 843039b

Please sign in to comment.