mirror of
https://github.com/EpinelPS/EpinelPS.git
synced 2025-12-13 23:44:45 +01:00
lobby ui works
This commit is contained in:
@@ -15,12 +15,9 @@ namespace nksrv.Utils
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static object lockObject = new object();
|
||||
public void Log(LogMessageReceivedEventArgs logEvent)
|
||||
{
|
||||
var fg = Console.ForegroundColor;
|
||||
Console.ForegroundColor = GetColorForMsg(logEvent);
|
||||
|
||||
var msg = logEvent.Message;
|
||||
if (msg.StartsWith("["))
|
||||
{
|
||||
@@ -28,12 +25,21 @@ namespace nksrv.Utils
|
||||
}
|
||||
|
||||
// ignore telemtry server errors
|
||||
if (!msg.StartsWith("POST /v2/dr/getsid: \"404 Not Found\""))
|
||||
if (msg.StartsWith("POST /v2/dr/"))
|
||||
{
|
||||
Console.WriteLine(msg);
|
||||
return;
|
||||
}
|
||||
|
||||
var newFG = GetColorForMsg(logEvent);
|
||||
|
||||
lock (lockObject)
|
||||
{
|
||||
var oldFG = Console.ForegroundColor;
|
||||
Console.ForegroundColor = newFG;
|
||||
Console.WriteLine(msg);
|
||||
Console.ForegroundColor = oldFG;
|
||||
}
|
||||
|
||||
Console.ForegroundColor = fg;
|
||||
}
|
||||
|
||||
private ConsoleColor GetColorForMsg(LogMessageReceivedEventArgs logEvent)
|
||||
|
||||
Reference in New Issue
Block a user