From aa3458da2bb1f3ba8f09b4d29686b9614852ad9b Mon Sep 17 00:00:00 2001 From: MZade Date: Tue, 24 Apr 2018 11:42:55 +0200 Subject: [PATCH 1/2] Log exception even if exception message is empty In some scenarios it happens that the Exceptions are not logged because of the fact that the Exception message is empty. This changeset will enable exception logging for the import jobs even when the exception message is null or empty string. --- Job.Import/Import.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Job.Import/Import.cs b/Job.Import/Import.cs index b636077..79cd38e 100644 --- a/Job.Import/Import.cs +++ b/Job.Import/Import.cs @@ -122,7 +122,13 @@ namespace RecurringIntegrationsScheduler.Job if (Log.IsDebugEnabled) { if (!string.IsNullOrEmpty(ex.Message)) + { Log.Error(ex.Message, ex); + } + else + { + Log.Error("Uknown exception", ex); + } while (ex.InnerException != null) { From 3308c911cb169dd450a0282b54871b03ba23d48e Mon Sep 17 00:00:00 2001 From: MZade Date: Tue, 24 Apr 2018 14:54:59 +0200 Subject: [PATCH 2/2] Log exception even if exception message is empty In some scenarios it happens that the Exceptions are not logged because of the fact that the Exception message is empty. This changeset will enable exception logging for the import jobs even when the exception message is null or empty string. --- Job.Download/Download.cs | 6 ++++++ Job.ExecutionMonitor/ExecutionMonitor.cs | 6 ++++++ Job.Export/Export.cs | 6 ++++++ Job.ProcessingMonitor/ProcessingMonitor.cs | 6 ++++++ Job.Upload/Upload.cs | 6 ++++++ 5 files changed, 30 insertions(+) diff --git a/Job.Download/Download.cs b/Job.Download/Download.cs index 72c4806..4f9bc5d 100644 --- a/Job.Download/Download.cs +++ b/Job.Download/Download.cs @@ -129,7 +129,13 @@ namespace RecurringIntegrationsScheduler.Job if (Log.IsDebugEnabled) { if (!string.IsNullOrEmpty(ex.Message)) + { Log.Error(ex.Message, ex); + } + else + { + Log.Error("Uknown exception", ex); + } while (ex.InnerException != null) { diff --git a/Job.ExecutionMonitor/ExecutionMonitor.cs b/Job.ExecutionMonitor/ExecutionMonitor.cs index 1d23147..a355b4f 100644 --- a/Job.ExecutionMonitor/ExecutionMonitor.cs +++ b/Job.ExecutionMonitor/ExecutionMonitor.cs @@ -119,7 +119,13 @@ namespace RecurringIntegrationsScheduler.Job if (Log.IsDebugEnabled) { if (!string.IsNullOrEmpty(ex.Message)) + { Log.Error(ex.Message, ex); + } + else + { + Log.Error("Uknown exception", ex); + } while (ex.InnerException != null) { diff --git a/Job.Export/Export.cs b/Job.Export/Export.cs index 58da131..1c830f3 100644 --- a/Job.Export/Export.cs +++ b/Job.Export/Export.cs @@ -109,7 +109,13 @@ namespace RecurringIntegrationsScheduler.Job if (Log.IsDebugEnabled) { if (!string.IsNullOrEmpty(ex.Message)) + { Log.Error(ex.Message, ex); + } + else + { + Log.Error("Uknown exception", ex); + } while (ex.InnerException != null) { diff --git a/Job.ProcessingMonitor/ProcessingMonitor.cs b/Job.ProcessingMonitor/ProcessingMonitor.cs index 13f9b51..13bd420 100644 --- a/Job.ProcessingMonitor/ProcessingMonitor.cs +++ b/Job.ProcessingMonitor/ProcessingMonitor.cs @@ -120,7 +120,13 @@ namespace RecurringIntegrationsScheduler.Job if (Log.IsDebugEnabled) { if (!string.IsNullOrEmpty(ex.Message)) + { Log.Error(ex.Message, ex); + } + else + { + Log.Error("Uknown exception", ex); + } while (ex.InnerException != null) { diff --git a/Job.Upload/Upload.cs b/Job.Upload/Upload.cs index cf52295..5066eb2 100644 --- a/Job.Upload/Upload.cs +++ b/Job.Upload/Upload.cs @@ -118,7 +118,13 @@ namespace RecurringIntegrationsScheduler.Job if (Log.IsDebugEnabled) { if (!string.IsNullOrEmpty(ex.Message)) + { Log.Error(ex.Message, ex); + } + else + { + Log.Error("Uknown exception", ex); + } while (ex.InnerException != null) {