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

42 lines
1.5 KiB

using System.Collections.Generic;
namespace ZeroLevel.Services.Logging
{
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"},
{ LogLevel.SystemFatal, "SYSFLT"}
};
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"},
{ LogLevel.SystemFatal, " system fatal"}
};
public static string CompactName(LogLevel level) { return _compact[level]; }
public static string FullName(LogLevel level) { return _full[level]; }
}
}

Powered by TurnKey Linux.