mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-13 13:22:28 +00:00
Make logger a non-static class
This commit is contained in:
parent
c345eeebb9
commit
630b38e7bb
27 changed files with 167 additions and 141 deletions
|
@ -46,7 +46,7 @@ public class MatchController : ControllerBase
|
|||
|
||||
if (bodyString.Length == 0 || bodyString[0] != '[') return this.BadRequest();
|
||||
|
||||
Logger.LogInfo("Received match data: " + bodyString, LogArea.Match);
|
||||
Logger.Info("Received match data: " + bodyString, LogArea.Match);
|
||||
|
||||
IMatchCommand? matchData;
|
||||
try
|
||||
|
@ -55,19 +55,19 @@ public class MatchController : ControllerBase
|
|||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Logger.LogError("Exception while parsing matchData: ", LogArea.Match);
|
||||
Logger.LogError(e.ToDetailedException(), LogArea.Match);
|
||||
Logger.Error("Exception while parsing matchData: ", LogArea.Match);
|
||||
Logger.Error(e.ToDetailedException(), LogArea.Match);
|
||||
|
||||
return this.BadRequest();
|
||||
}
|
||||
|
||||
if (matchData == null)
|
||||
{
|
||||
Logger.LogError($"Could not parse match data: {nameof(matchData)} is null", LogArea.Match);
|
||||
Logger.Error($"Could not parse match data: {nameof(matchData)} is null", LogArea.Match);
|
||||
return this.BadRequest();
|
||||
}
|
||||
|
||||
Logger.LogInfo($"Parsed match from {user.Username} (type: {matchData.GetType()})", LogArea.Match);
|
||||
Logger.Info($"Parsed match from {user.Username} (type: {matchData.GetType()})", LogArea.Match);
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue