Пример #1
0
 public void AddEventListener(LogLevel level, EventListenerDelegate listener)
 {
     if (this.AiWanNet != null)
     {
         this.AiWanNet.AddEventListener(LoggerEvent.LogEventType(level), listener);
     }
 }
Пример #2
0
 private void Log(LogLevel level, string message)
 {
     if (level >= this.loggingLevel)
     {
         if (this.enableConsoleTrace)
         {
             Console.WriteLine(string.Concat(new object[]
             {
                 "[SFS - ",
                 level,
                 "] ",
                 message
             }));
         }
         if (this.enableEventDispatching && this.AiWanNet != null)
         {
             Hashtable hashtable = new Hashtable();
             hashtable.Add("message", message);
             LoggerEvent evt = new LoggerEvent(this.loggingLevel, hashtable);
             this.AiWanNet.DispatchEvent(evt);
         }
     }
 }
Пример #3
0
 public LoggerEvent(LogLevel level, Hashtable parameters) : base(LoggerEvent.LogEventType(level), parameters)
 {
     this.level = level;
 }