mirror of
https://github.com/EpinelPS/EpinelPS.git
synced 2025-12-16 17:04:44 +01:00
improve logging
This commit is contained in:
@@ -18,16 +18,7 @@ namespace EpinelPS.Controllers
|
||||
await LobbyHandler.DispatchSingle(HttpContext);
|
||||
st.Stop();
|
||||
|
||||
var fg = Console.ForegroundColor;
|
||||
|
||||
if (HttpContext.Response.StatusCode == 200)
|
||||
Console.ForegroundColor = ConsoleColor.DarkGreen;
|
||||
else
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
|
||||
Logging.WriteLine("POST " + HttpContext.Request.Path.Value + " completed in " + st.Elapsed + " with result " + HttpContext.Response.StatusCode, LogType.InfoSuccess);
|
||||
|
||||
Console.ForegroundColor = fg;
|
||||
Logging.WriteLine($"POST {HttpContext.Request.Path.Value}: {HttpContext.Response.StatusCode}", LogType.Info);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user