コード例 #1
0
        public static void WriteConsole(string msg, FTPModel.LogModel.LogLevel level = FTPModel.LogModel.LogLevel.Common)
        {
            if (MessageConsole._onLogger != null)
            {
                MessageConsole._onLogger(msg, level);
            }
            DateTime dtime = DateTime.Now;
            string   txt   = "[" + dtime + "] " + msg;

            Log.WriteLog(txt, level);
        }
コード例 #2
0
 public static void WriteLog(string content, FTPModel.LogModel.LogLevel level)
 {
     if (level == FTPModel.LogModel.LogLevel.Common)
     {
         Log._runtimeLogger.Info(content);
     }
     else
     {
         Log._runtimeErrorLogger.Error(content);
     }
 }
コード例 #3
0
 public void OutputLog(string msg, FTPModel.LogModel.LogLevel level)
 {
     if (this.IsHandleCreated)
     {
         this.tbMsg.Invoke((MethodInvoker) delegate()
         {
             lock (this.tbMsg)
             {
                 DateTime dtime = DateTime.Now;
                 this.tbMsg.AppendText("[" + dtime + "] " + msg + "\r\n");
             }
         });
     }
 }