Exemplo 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),
            };
        }
Exemplo n.º 2
0
 /// <summary>
 ///     The log as it was read.
 /// </summary>
 //TODO:
 //public string RawLog;
 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];
     }
 }
Exemplo n.º 3
0
 public void CheckNull()
 {
     if (string.IsNullOrEmpty(LoggerName))
         LoggerName = "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)];
 }
Exemplo n.º 4
0
 private UserSettings()
 {
     // Set default values
     _logLevelInfo = LogLevels.Instance[(int)LogLevel.Trace];
 }
Exemplo n.º 5
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),
              };
        }