/// <summary>
 /// 写一条日志信息
 /// </summary>
 /// <param name="logLevel">当前信息的日志等级</param>
 /// <param name="message">信息主体,可是多个对象(当未是String时,将会调用object的Tostring()获取字符串)</param>
 public void Write(SimpleLoggerLevel logLevel, params object[] message)
 {
     lock (Stream)
     {
         StringBuilder sb = new StringBuilder();
         //加入时间信息
         sb.Append(DateTime.Now.ToString("yyMMdd HH:mm:ss"))
         .Append(" ")
         .Append(DateTime.Now.Millisecond.ToString().PadLeft(3, '0'))
         .Append(",\t")
         .Append(logLevel.ToString())
         .Append(",   \t");
         //使用者附加的Log信息
         foreach (object item in message)
         {
             if (item is Exception)
             {
                 if (item != null)
                 {
                     sb.Append(((Exception)item).Message).Append(" | ");
                 }
             }
             else if (item == null)
             {
                 continue;
             }
             else
             {
                 sb.Append(item.ToString()).Append(" | ");
             }
         }
         //写入文件
         string log = sb.ToString(0, sb.Length - 2);
         Stream.WriteLine(log);
         Stream.Flush();
         OnLogWrited(new LogWritedEventArgs(log));
     }//lock (_StreamWriterDic)
 }
 /// <summary>
 /// 写一条日志信息
 /// </summary>
 /// <param name="logLevel">当前信息的日志等级</param>
 /// <param name="message">信息主体,可是多个对象(当未是String时,将会调用object的Tostring()获取字符串)</param>
 public void Write(SimpleLoggerLevel logLevel, params object[] message)
 {
     lock (Stream)
     {
         StringBuilder sb = new StringBuilder();
         //加入时间信息
         sb.Append(DateTime.Now.ToString("yyMMdd HH:mm:ss"))
           .Append(" ")
           .Append(DateTime.Now.Millisecond.ToString().PadLeft(3, '0'))
           .Append(",\t")
           .Append(logLevel.ToString())
           .Append(",   \t");
         //使用者附加的Log信息
         foreach (object item in message)
         {
             if (item is Exception)
             {
                 if (item != null)
                 {
                     sb.Append(((Exception)item).Message).Append(" | ");
                 }
             }
             else if (item == null)
             {
                 continue;
             }
             else
             {
                 sb.Append(item.ToString()).Append(" | ");
             }
         }
         //写入文件
         string log = sb.ToString(0, sb.Length - 2);
         Stream.WriteLine(log);
         Stream.Flush();
         OnLogWrited(new LogWritedEventArgs(log));
     }//lock (_StreamWriterDic)
 }