mirror of
https://github.com/EpinelPS/EpinelPS.git
synced 2025-12-14 07:55:01 +01:00
refactoring part 3, improve logging
This commit is contained in:
@@ -96,7 +96,6 @@ namespace EpinelPS.Controllers
|
||||
return "{}";
|
||||
}
|
||||
|
||||
Console.WriteLine("Requesting gameId: " + body.game_id);
|
||||
return System.IO.File.ReadAllText(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "gameversion.json"));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using EpinelPS.LobbyServer;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Diagnostics;
|
||||
using EpinelPS.Utils;
|
||||
|
||||
namespace EpinelPS.Controllers
|
||||
{
|
||||
@@ -24,7 +25,7 @@ namespace EpinelPS.Controllers
|
||||
else
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
|
||||
Console.WriteLine("POST " + HttpContext.Request.Path.Value + " completed in " + st.Elapsed + "with result " + HttpContext.Response.StatusCode);
|
||||
Logging.WriteLine("POST " + HttpContext.Request.Path.Value + " completed in " + st.Elapsed + " with result " + HttpContext.Response.StatusCode, LogType.InfoSuccess);
|
||||
|
||||
Console.ForegroundColor = fg;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user