0
0
Fork 0
mirror of https://github.com/Sanae6/SmoOnlineServer.git synced 2024-11-10 13:45:06 +00:00
SmoOnlineServer/Shared/Logger.cs
2021-11-28 22:32:29 -06:00

23 lines
No EOL
561 B
C#

namespace Shared;
public class Logger {
public string Name { get; }
public Logger(string name) {
Name = name;
}
public void Info(string text) {
Console.ResetColor();
Console.WriteLine($"Info [{Name}] {text}");
}
public void Warn(string text) {
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine($"Warn [{Name}] {text}");
}
public void Error(string text) {
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine($"Warn [{Name}] {text}");
}
}