Beispiel #1
0
        public override void Log(IServer server, ServerLogEventArgs e)
        {
            if (ServerLog == null)
            {
                if (ServerConfig.LogToConsole)
                {
                    base.Log(server, e);
                }
                if (ServerConfig.WriteLog)
                {
                    mFileLog.Add(e);
                }
            }
            else
            {
                ServerLog(server, e);
            }
            ISession output = LogOutput;

            if (output != null && e.Session != output)
            {
                ActionResult log = new ActionResult();
                log.Data = new { LogType = e.Type.ToString(), Time = DateTime.Now.ToString("H:mm:ss"), Message = e.Message };
                CreateDataFrame(log).Send(output);
            }
        }
Beispiel #2
0
 public override void Log(IServer server, ServerLogEventArgs e)
 {
     if (ServerLog == null)
     {
         if (ServerConfig.LogToConsole)
         {
             base.Log(server, e);
         }
         if (ServerConfig.WriteLog)
         {
             mFileLog.Add(e);
         }
     }
     else
     {
         ServerLog(server, e);
     }
 }