// 将日志事件直接写入日志
        protected void DoLogEvent(LogEvent[] akLogEvent)
        {
            if (LoggingEventHandler != null)
            {
                foreach (LogEvent kLogEvent in akLogEvent)
                    LoggingEventHandler(this, kLogEvent);
            }

            foreach (LogEvent kLogEvent in akLogEvent)
            {
                mStreamWriter.WriteLine(String.Format("{0:s}[{1}]{2:s}", kLogEvent.Time.ToString(), kLogEvent.Level, kLogEvent.Message));
            }

            mStreamWriter.Flush();
        }
 // 记录日志(虚函数继承,继承自ILoggingService)
 public virtual void DoLog(String kMsg, ELogLevel eLevel, bool bImmediate)
 {
     LogEvent kLogEvent = new LogEvent(kMsg, DateTime.Now, eLevel);
     if (bImmediate)
     {
         DoLogEvent(kLogEvent);
     }
     else
     {
         // 加入队列
         Thread.BeginCriticalRegion();
         mLogQueue.Enqueue(kLogEvent);
         Thread.EndCriticalRegion();
     }
 }