AxibugEmuOnline_old/AxibugEmuOnline.Server/Manager/LogManager.cs

48 lines
1.2 KiB
C#
Raw Normal View History

using AxibugProtobuf;
using static Mysqlx.Expect.Open.Types;
namespace AxibugEmuOnline.Server.Manager
2024-06-28 17:43:55 +08:00
{
public class LogManager
{
public void Info(string str)
{
Console.WriteLine(str);
}
2024-11-11 19:21:35 +08:00
public void DebugCmd(string str)
{
ConsoleColor srcColor = Console.ForegroundColor;
Console.ForegroundColor = ConsoleColor.Blue;
Console.WriteLine($"[{DateTime.Now.ToString("hh:mm:ss.fff")}][{str}]");
Console.ForegroundColor = srcColor;
}
2024-06-28 17:43:55 +08:00
public void Debug(string str)
{
2024-11-11 19:21:35 +08:00
Console.WriteLine($"[{DateTime.Now.ToString("hh:mm:ss.fff")}][{str}]");
//Console.WriteLine(str);
2024-06-28 17:43:55 +08:00
}
public void Assert(bool conditional, string message)
{
if (!conditional)
{
Debug(message);
}
}
2024-06-28 17:43:55 +08:00
public void Warning(string str)
{
Console.WriteLine(str);
}
public void Error(string str)
{
Console.WriteLine(str);
}
public void Log(int logtype, string str)
{
Console.WriteLine(str);
}
}
}