示例#1
0
 public void AddEventListener(LogLevel level, EventListenerDelegate listener)
 {
     if (smartFox != null)
     {
         smartFox.AddEventListener(LoggerEvent.LogEventType(level), listener);
     }
 }
示例#2
0
 public void RemoveEventListener(LogLevel logLevel, EventListenerDelegate listener)
 {
     if (smartFox != null)
     {
         smartFox.RemoveEventListener(LoggerEvent.LogEventType(logLevel), listener);
     }
 }
示例#3
0
 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);
         }
     }
 }