private void OnLog(LoggerEventArgs e) { foreach (EventListener el in Plugins) { ServerListener sl = (ServerListener)el.Listener; if (el.Event == Event.LoggerLog) sl.OnLog(e); } }
public void Log(LogLevel level, string message) { //Event LoggerEventArgs e = new LoggerEventArgs(this, level, message); Server.PluginManager.CallEvent(Event.LoggerLog, e); // do not allow cancellation or altering of log messages //End Event LogToConsole(level, message, true); LogToFile(level, message, true); }
public virtual void OnLog(LoggerEventArgs e) { }
public void Log(Exception ex) { //Event LoggerEventArgs e = new LoggerEventArgs(this, LogLevel.Debug, ex.ToString(), ex); Server.PluginManager.CallEvent(Event.LoggerLog, e); // do not allow cancellation or altering of log messages //End Event Log(LogLevel.Debug, ex.ToString()); }