Example #1
0
 /// <summary>
 /// 输出INFO日志到LOG4NET
 /// </summary>
 /// <param name="msg"></param>
 public static void Info(string msg)
 {
     if (!LogOutPut.GetInstance().CanWriteLog)
     {
         return;
     }
     log4net.ILog log = log4net.LogManager.GetLogger("INFO");
     log.Info(msg);
     if (LogOutPut.GetInstance().CanSendLog)
     {
         LogOutPut.GetInstance().Send(new OutMsg()
         {
             Client    = Path.GetFileNameWithoutExtension(Process.GetCurrentProcess().MainModule.FileName),
             Type      = "INFO",
             Message   = msg,
             Exception = null,
             Time      = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss.fff")
         });
     }
 }