From 6404e1b7a2a7b7d414dbad5461ea559693b4935c Mon Sep 17 00:00:00 2001 From: jvyden Date: Sun, 14 Nov 2021 17:44:00 -0500 Subject: [PATCH] Add more logging to MatchController --- ProjectLighthouse/Controllers/MatchController.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ProjectLighthouse/Controllers/MatchController.cs b/ProjectLighthouse/Controllers/MatchController.cs index 900107f8..4d1fa398 100644 --- a/ProjectLighthouse/Controllers/MatchController.cs +++ b/ProjectLighthouse/Controllers/MatchController.cs @@ -60,7 +60,14 @@ namespace LBPUnion.ProjectLighthouse.Controllers return this.BadRequest(); } - if (matchData == null) return this.BadRequest(); + if (matchData == null) + { + Logger.Log("Could not parse match data: matchData is null", LoggerLevelMatch.Instance); + Logger.Log("Data: " + bodyString, LoggerLevelMatch.Instance); + return this.BadRequest(); + } + + Logger.Log($"Parsed match from {user.Username} (type: {matchData.GetType()})", LoggerLevelMatch.Instance); #endregion