2022-02-10 01:44:50 +00:00
|
|
|
|
namespace Shared;
|
2021-11-29 04:04:34 +00:00
|
|
|
|
|
|
|
|
|
public class Logger {
|
|
|
|
|
public Logger(string name) {
|
|
|
|
|
Name = name;
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-14 19:45:58 +00:00
|
|
|
|
public string Name { get; set; }
|
2022-02-10 01:44:50 +00:00
|
|
|
|
|
2021-11-29 04:04:34 +00:00
|
|
|
|
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}");
|
|
|
|
|
}
|
|
|
|
|
}
|