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); }
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); } }
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"); } }); } }