public void WriteLog(Enum FileNamePrefix, Exception ex) { string Log = CInfo.GetExceptionText(ex); LogFileNameFormat FileNameFormat = LogFileNameFormat.yyyyMMdd; WriteLog(FileNamePrefix, Log, FileNameFormat); }
public void WriteLog(string Log, Exception ex) { Log = "Log:" + Log + "\r\n" + CInfo.GetExceptionText(ex); LogFileNameFormat FileNameFormat = LogFileNameFormat.yyyyMMdd; WriteLog(LogFileNamePrefix.Error, Log, FileNameFormat); }
private void WriteLog(LogTypes LogType, string FullPathSrc, string FullPathSrcNew, string FullPathDest, Exception ex) { string FullPath = Path.Combine(this._LogFolder, LogType.ToString() + DateTime.Now.ToString("yyyyMMdd") + ".log"); string Log = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "\t" + FullPathSrc + (!string.IsNullOrEmpty(FullPathSrcNew) ? "(" + FullPathSrcNew + ")" : "") + "\t" + FullPathDest + "\t" + ((ex != null) ? CInfo.GetExceptionText(ex) : ""); _Logging.WriteLog(FullPath, Log); }
public void WriteLog(Exception ex, LogFileNameFormat FileNameFormat) { string Log = CInfo.GetExceptionText(ex); WriteLog(LogFileNamePrefix.Error, Log, FileNameFormat); }