public void AddEventListener(LogLevel level, EventListenerDelegate listener) { if (this.AiWanNet != null) { this.AiWanNet.AddEventListener(LoggerEvent.LogEventType(level), listener); } }
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); } } }
public LoggerEvent(LogLevel level, Hashtable parameters) : base(LoggerEvent.LogEventType(level), parameters) { this.level = level; }