bonuska2/SimpleTGBot/Logging/LogLevel.cs

20 lines
440 B
C#

namespace SimpleTGBot.Logging;
internal enum LogLevel : int
{
Debug = 0, Info, Warning, Error, Fatal
}
static class LogLevelExt
{
public static string GetName(this LogLevel level)
{
return level switch {
LogLevel.Debug => "DEBUG",
LogLevel.Info => "INFO",
LogLevel.Warning => "WARN",
LogLevel.Error => "ERROR",
LogLevel.Fatal => "FATAL"
};
}
}