Esempio n. 1
0
        private LogLevels()
        {
            InvalidLogLevel = new LogLevelInfo(LogLevel.None, Color.IndianRed);

            LogLevelInfos = new LogLevelInfo[]
            {
                new LogLevelInfo(LogLevel.Trace, "Trace", UserSettings.DefaultTraceLevelColor, 10000, 0, 10000),
                new LogLevelInfo(LogLevel.Debug, "Debug", UserSettings.DefaultDebugLevelColor, 30000, 10001, 30000),
                new LogLevelInfo(LogLevel.Info, "Info", UserSettings.DefaultInfoLevelColor, 40000, 30001, 40000),
                new LogLevelInfo(LogLevel.Warn, "Warn", UserSettings.DefaultWarnLevelColor, 60000, 40001, 60000),
                new LogLevelInfo(LogLevel.Error, "Error", UserSettings.DefaultErrorLevelColor, 70000, 60001, 70000),
                new LogLevelInfo(LogLevel.Fatal, "Fatal", UserSettings.DefaultFatalLevelColor, 110000, 70001, 110000),
            };
        }
Esempio n. 2
0
 public void CheckNull()
 {
     if (string.IsNullOrEmpty(LoggerName))
     {
         LoggerName = "Unknown";
     }
     if (string.IsNullOrEmpty(RootLoggerName))
     {
         RootLoggerName = "Unknown";
     }
     if (string.IsNullOrEmpty(Message))
     {
         Message = "Unknown";
     }
     if (string.IsNullOrEmpty(ThreadName))
     {
         ThreadName = string.Empty;
     }
     if (string.IsNullOrEmpty(ExceptionString))
     {
         ExceptionString = string.Empty;
     }
     if (string.IsNullOrEmpty(ExceptionString))
     {
         ExceptionString = string.Empty;
     }
     if (string.IsNullOrEmpty(CallSiteClass))
     {
         CallSiteClass = string.Empty;
     }
     if (string.IsNullOrEmpty(CallSiteMethod))
     {
         CallSiteMethod = string.Empty;
     }
     if (string.IsNullOrEmpty(SourceFileName))
     {
         SourceFileName = string.Empty;
     }
     if (Level == null)
     {
         Level = LogLevels.Instance[(LogLevel.Error)];
     }
 }