示例#1
0
 public static void Log(LoggerData loggerData)
 {
     foreach (ILogger logger in LoggerInstances)
     {
         if (logger.Enabled)
         {
             logger.Log(loggerData);
         }
     }
 }
 public void Log(string message, LoggerSeverity.LogSeverities severity, Dictionary<string, string> extendedProperties)
 {
     LoggerData loggerData = new LoggerData {
         Message = message,
         Severity = severity,
         ExtendedProperties = extendedProperties
     };
     this.Log(loggerData);
 }
 public void Log(string message, LoggerSeverity.LogSeverities severity)
 {
     LoggerData loggerData = new LoggerData {
         Message = message,
         Severity = severity
     };
     this.Log(loggerData);
 }
 public void Log(LoggerData loggerData)
 {
     this._log.Add(loggerData);
     int count = this._log.Count;
     if (this.ImmediateClientSave || (count >= this.MaxItemsInLogBeforeClientSave))
     {
         this.Save();
     }
     if (this.ImmediateServerSave || (count >= this.MaxItemsInLogBeforeServerSave))
     {
         this.SaveToServer();
     }
 }
示例#5
0
 public static void Log(string loggerIdentification, LoggerData loggerData)
 {
     ILogger logger = Enumerable.FirstOrDefault<ILogger>(LoggerInstances, (Func<ILogger, bool>) (l => (l.Identification == loggerIdentification)));
     if ((logger != null) && logger.Enabled)
     {
         logger.Log(loggerData);
     }
 }
示例#6
0
 public static void Log(string loggerIdentification, string message, LoggerSeverity.LogSeverities severity)
 {
     LoggerData loggerData = new LoggerData {
         Message = message,
         Severity = severity
     };
     Log(loggerIdentification, loggerData);
 }