Example #1
0
        public void WriteLog(Enum FileNamePrefix, Exception ex)
        {
            string            Log            = CInfo.GetExceptionText(ex);
            LogFileNameFormat FileNameFormat = LogFileNameFormat.yyyyMMdd;

            WriteLog(FileNamePrefix, Log, FileNameFormat);
        }
Example #2
0
        public void WriteLog(string Log, Exception ex)
        {
            Log = "Log:" + Log + "\r\n" + CInfo.GetExceptionText(ex);
            LogFileNameFormat FileNameFormat = LogFileNameFormat.yyyyMMdd;

            WriteLog(LogFileNamePrefix.Error, Log, FileNameFormat);
        }
Example #3
0
        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);
        }
Example #4
0
        public void WriteLog(Exception ex, LogFileNameFormat FileNameFormat)
        {
            string Log = CInfo.GetExceptionText(ex);

            WriteLog(LogFileNamePrefix.Error, Log, FileNameFormat);
        }