From 68540cb4792d3d7fb2fdd8adcd7fa4aa034cfaaf Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Sun, 7 Feb 2016 00:23:13 +0100 Subject: [PATCH] Certain log messages didn't include the exception. --- src/NzbDrone.Common/Instrumentation/GlobalExceptionHandlers.cs | 2 +- src/NzbDrone.Common/Processes/PidFileProvider.cs | 2 +- src/NzbDrone.Core/Datastore/Database.cs | 2 +- src/NzbDrone.Core/HealthCheck/Checks/DownloadClientCheck.cs | 2 +- src/NzbDrone.Core/Messaging/Commands/CommandExecutor.cs | 2 +- src/NzbDrone.Core/Metadata/Consumers/Xbmc/XbmcMetadata.cs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/NzbDrone.Common/Instrumentation/GlobalExceptionHandlers.cs b/src/NzbDrone.Common/Instrumentation/GlobalExceptionHandlers.cs index 7d51bc4a3..b490757fb 100644 --- a/src/NzbDrone.Common/Instrumentation/GlobalExceptionHandlers.cs +++ b/src/NzbDrone.Common/Instrumentation/GlobalExceptionHandlers.cs @@ -19,7 +19,7 @@ private static void HandleTaskException(object sender, UnobservedTaskExceptionEv var exception = e.Exception; Console.WriteLine("Task Error: {0}", exception); - Logger.Error("Task Error: " + exception.Message, exception); + Logger.ErrorException("Task Error: " + exception.Message, exception); } private static void HandleAppDomainException(object sender, UnhandledExceptionEventArgs e) diff --git a/src/NzbDrone.Common/Processes/PidFileProvider.cs b/src/NzbDrone.Common/Processes/PidFileProvider.cs index a89c76fdd..eacf8b560 100644 --- a/src/NzbDrone.Common/Processes/PidFileProvider.cs +++ b/src/NzbDrone.Common/Processes/PidFileProvider.cs @@ -37,7 +37,7 @@ public void Write() } catch (Exception ex) { - _logger.Error("Unable to write PID file: " + filename, ex); + _logger.ErrorException("Unable to write PID file: " + filename, ex); throw; } } diff --git a/src/NzbDrone.Core/Datastore/Database.cs b/src/NzbDrone.Core/Datastore/Database.cs index 8ef429261..f8ac9bd53 100644 --- a/src/NzbDrone.Core/Datastore/Database.cs +++ b/src/NzbDrone.Core/Datastore/Database.cs @@ -50,7 +50,7 @@ public void Vacuum() } catch (Exception e) { - _logger.Error("An Error occurred while vacuuming database.", e); + _logger.ErrorException("An Error occurred while vacuuming database.", e); } } } diff --git a/src/NzbDrone.Core/HealthCheck/Checks/DownloadClientCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/DownloadClientCheck.cs index 851c94e84..8de03222b 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/DownloadClientCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/DownloadClientCheck.cs @@ -35,7 +35,7 @@ public override HealthCheck Check() { var message = String.Format("Unable to communicate with {0}.", downloadClient.Definition.Name); - _logger.Error(message, ex); + _logger.ErrorException(message, ex); return new HealthCheck(GetType(), HealthCheckResult.Error, message + " " + ex.Message); } } diff --git a/src/NzbDrone.Core/Messaging/Commands/CommandExecutor.cs b/src/NzbDrone.Core/Messaging/Commands/CommandExecutor.cs index 0deb5c9df..bc328c7dc 100644 --- a/src/NzbDrone.Core/Messaging/Commands/CommandExecutor.cs +++ b/src/NzbDrone.Core/Messaging/Commands/CommandExecutor.cs @@ -53,7 +53,7 @@ private void ExecuteCommands() } catch (Exception ex) { - _logger.Error("Unknown error in thread: " + ex.Message, ex); + _logger.ErrorException("Unknown error in thread: " + ex.Message, ex); } } diff --git a/src/NzbDrone.Core/Metadata/Consumers/Xbmc/XbmcMetadata.cs b/src/NzbDrone.Core/Metadata/Consumers/Xbmc/XbmcMetadata.cs index 3ca83e18f..ceebd0813 100644 --- a/src/NzbDrone.Core/Metadata/Consumers/Xbmc/XbmcMetadata.cs +++ b/src/NzbDrone.Core/Metadata/Consumers/Xbmc/XbmcMetadata.cs @@ -335,7 +335,7 @@ public override List EpisodeImages(Series series, EpisodeFile e } catch (Exception ex) { - _logger.Error("Unable to process episode image for file: " + Path.Combine(series.Path, episodeFile.RelativePath), ex); + _logger.ErrorException("Unable to process episode image for file: " + Path.Combine(series.Path, episodeFile.RelativePath), ex); return new List(); }