public void AddEventListener(LogLevel level, EventListenerDelegate listener) { if (smartFox != null) { smartFox.AddEventListener(LoggerEvent.LogEventType(level), listener); } }
public void RemoveEventListener(LogLevel logLevel, EventListenerDelegate listener) { if (smartFox != null) { smartFox.RemoveEventListener(LoggerEvent.LogEventType(logLevel), listener); } }
private void Log(LogLevel level, string message) { if (level >= loggingLevel) { if (enableConsoleTrace) { Console.WriteLine(string.Concat("[SFS - ", level, "] ", message)); } if (enableEventDispatching && smartFox != null) { Hashtable hashtable = new Hashtable(); hashtable.Add("message", message); LoggerEvent evt = new LoggerEvent(level, hashtable); smartFox.DispatchEvent(evt); } } }