예제 #1
0
        public bool LogError(Exception e, ErrorLevels errorLevel = ErrorLevels.Default,
            string strAdditionalInformation = "Additional Information Default")
        {
            Debug.WriteLine(GetType().FullName + "." + MethodBase.GetCurrentMethod().Name);

            var sb = new StringBuilder();
            sb.AppendLine("______________________________ERROR_________________________________");
            sb.AppendLine(strAdditionalInformation);
            sb.AppendLine(errorLevel.ToNameString());
            sb.AppendLine(ErrorFactory.GetErrorAsString(e));
            sb.AppendLine();
            sb.AppendLine();

            _fileService.SaveTextToDirectoryFile(DirectoryFolders.Jt76Errors, sb.ToString());
            return true;
        }
예제 #2
0
        public bool LogError(Exception e, ErrorLevels errorLevel = ErrorLevels.Default,
            string strAdditionalInformation = "Additional Information Default")
        {
            Debug.WriteLine(GetType().FullName + "." + MethodBase.GetCurrentMethod().Name);

            var sb = new StringBuilder();
            sb.AppendLine(strAdditionalInformation);
            sb.AppendLine(errorLevel.ToNameString());
            sb.AppendLine(ErrorFactory.GetErrorAsString(e));

            _emailService.SendMeMail(sb.ToString());
            return true;
        }