mirror of
https://github.com/Sanae6/SmoOnlineServer.git
synced 2024-11-15 16:15:06 +00:00
24 lines
No EOL
566 B
C#
24 lines
No EOL
566 B
C#
namespace Shared;
|
|
|
|
public class Logger {
|
|
public Logger(string name) {
|
|
Name = name;
|
|
}
|
|
|
|
public string Name { get; set; }
|
|
|
|
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}");
|
|
}
|
|
} |