You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Zero/ZeroLevel/Services/Logging/LogLevelNameMapping.cs

48 lines
1.4 KiB

6 years ago
using System.Collections.Generic;
5 years ago
using ZeroLevel.Logging;
6 years ago
5 years ago
namespace ZeroLevel.Logging
6 years ago
{
internal static class LogLevelNameMapping
{
private static readonly Dictionary<LogLevel, string> _compact = new Dictionary<LogLevel, string>
{
{ LogLevel.Error, "ERR"},
{ LogLevel.Fatal, "FLT"},
{ LogLevel.Info, "INF"},
{ LogLevel.None, ""},
{ LogLevel.Verbose, "VRB"},
{ LogLevel.Warning, "WRN"},
{ LogLevel.Debug, "DBG"},
{ LogLevel.SystemInfo, "SYSINF"},
{ LogLevel.SystemError, "SYSERR"},
{ LogLevel.SystemWarning, "SYSWRN"}
6 years ago
};
6 years ago
private static readonly Dictionary<LogLevel, string> _full = new Dictionary<LogLevel, string>
{
{ LogLevel.Error, " error"},
{ LogLevel.Fatal, " fatal"},
{ LogLevel.Info, " info"},
{ LogLevel.None, ""},
{ LogLevel.Verbose, " verbose"},
{ LogLevel.Warning, " warning"},
{ LogLevel.Debug, " debug"},
{ LogLevel.SystemInfo, " system info"},
{ LogLevel.SystemError, " system error"},
{ LogLevel.SystemWarning, " systm warning"}
6 years ago
};
public static string CompactName(LogLevel level)
{
return _compact[level];
}
public static string FullName(LogLevel level)
{
return _full[level];
}
6 years ago
}
}

Powered by TurnKey Linux.