diff --git a/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs b/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs index 5cd0bdf0a..81c5a221f 100644 --- a/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs +++ b/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs @@ -191,12 +191,12 @@ namespace NzbDrone.Core.Download.Clients.Deluge } catch (DownloadClientAuthenticationException ex) { - _logger.Error(ex); + _logger.Error(ex, ex.Message); return new NzbDroneValidationFailure("Password", "Authentication failed"); } catch (WebException ex) { - _logger.Error(ex); + _logger.Error(ex, "Unable to test connection"); switch (ex.Status) { case WebExceptionStatus.ConnectFailure: @@ -220,7 +220,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge } catch (Exception ex) { - _logger.Error(ex); + _logger.Error(ex, "Failed to test connection"); return new NzbDroneValidationFailure(string.Empty, "Unknown exception: " + ex.Message); } @@ -271,7 +271,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge } catch (Exception ex) { - _logger.Error(ex); + _logger.Error(ex, "Unable to get torrents"); return new NzbDroneValidationFailure(string.Empty, "Failed to get the list of torrents: " + ex.Message); } diff --git a/src/NzbDrone.Core/Download/Clients/DownloadStation/TorrentDownloadStation.cs b/src/NzbDrone.Core/Download/Clients/DownloadStation/TorrentDownloadStation.cs index c89ff5b9f..0d2ca3d01 100644 --- a/src/NzbDrone.Core/Download/Clients/DownloadStation/TorrentDownloadStation.cs +++ b/src/NzbDrone.Core/Download/Clients/DownloadStation/TorrentDownloadStation.cs @@ -320,12 +320,12 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation } catch (DownloadClientAuthenticationException ex) // User could not have permission to access to downloadstation { - _logger.Error(ex); + _logger.Error(ex, ex.Message); return new NzbDroneValidationFailure(string.Empty, ex.Message); } catch (Exception ex) { - _logger.Error(ex); + _logger.Error(ex, "Error testing Torrent Download Station"); return new NzbDroneValidationFailure(string.Empty, $"Unknown exception: {ex.Message}"); } } @@ -346,7 +346,7 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation } catch (WebException ex) { - _logger.Error(ex); + _logger.Error(ex, "Unable to connect to Torrent Download Station"); if (ex.Status == WebExceptionStatus.ConnectFailure) { @@ -359,7 +359,7 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation } catch (Exception ex) { - _logger.Error(ex); + _logger.Error(ex, "Error testing Torrent Download Station"); return new NzbDroneValidationFailure(string.Empty, $"Unknown exception: {ex.Message}"); } } diff --git a/src/NzbDrone.Core/Download/Clients/DownloadStation/UsenetDownloadStation.cs b/src/NzbDrone.Core/Download/Clients/DownloadStation/UsenetDownloadStation.cs index 1e94586f0..a2fb7f783 100644 --- a/src/NzbDrone.Core/Download/Clients/DownloadStation/UsenetDownloadStation.cs +++ b/src/NzbDrone.Core/Download/Clients/DownloadStation/UsenetDownloadStation.cs @@ -234,12 +234,12 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation } catch (DownloadClientAuthenticationException ex) // User could not have permission to access to downloadstation { - _logger.Error(ex); + _logger.Error(ex, ex.Message); return new NzbDroneValidationFailure(string.Empty, ex.Message); } catch (Exception ex) { - _logger.Error(ex); + _logger.Error(ex, "Error testing Usenet Download Station"); return new NzbDroneValidationFailure(string.Empty, $"Unknown exception: {ex.Message}"); } } @@ -260,7 +260,7 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation } catch (WebException ex) { - _logger.Error(ex); + _logger.Error(ex, "Unable to connect to Usenet Download Station"); if (ex.Status == WebExceptionStatus.ConnectFailure) { @@ -273,7 +273,7 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation } catch (Exception ex) { - _logger.Error(ex); + _logger.Error(ex, "Error testing Torrent Download Station"); return new NzbDroneValidationFailure(string.Empty, "Unknown exception: " + ex.Message); } } diff --git a/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortex.cs b/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortex.cs index e35a98949..1b156a0ca 100644 --- a/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortex.cs +++ b/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortex.cs @@ -169,7 +169,7 @@ namespace NzbDrone.Core.Download.Clients.NzbVortex } catch (Exception ex) { - _logger.Error(ex); + _logger.Error(ex, "Unable to connect to NZBVortex"); return new ValidationFailure("Host", "Unable to connect to NZBVortex"); } @@ -190,7 +190,7 @@ namespace NzbDrone.Core.Download.Clients.NzbVortex } catch (Exception ex) { - _logger.Error(ex); + _logger.Error(ex, "Unable to connect to NZBVortex"); return new ValidationFailure("Host", "Unable to connect to NZBVortex"); } diff --git a/src/NzbDrone.Core/Download/Clients/Nzbget/Nzbget.cs b/src/NzbDrone.Core/Download/Clients/Nzbget/Nzbget.cs index 0728b65cb..f2d613192 100644 --- a/src/NzbDrone.Core/Download/Clients/Nzbget/Nzbget.cs +++ b/src/NzbDrone.Core/Download/Clients/Nzbget/Nzbget.cs @@ -61,7 +61,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget } catch (DownloadClientException ex) { - _logger.Error(ex); + _logger.Error(ex, ex.Message); return Enumerable.Empty(); } @@ -127,7 +127,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget } catch (DownloadClientException ex) { - _logger.Error(ex); + _logger.Error(ex, ex.Message); return Enumerable.Empty(); } @@ -289,7 +289,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget { return new ValidationFailure("Username", "Authentication failed"); } - _logger.Error(ex); + _logger.Error(ex, "Unable to connect to NZBGet"); return new ValidationFailure("Host", "Unable to connect to NZBGet"); } diff --git a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs index 34f7d5195..d1fd5f17a 100644 --- a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs +++ b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrent.cs @@ -99,7 +99,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent } catch (DownloadClientException ex) { - _logger.Error(ex); + _logger.Error(ex, ex.Message); return Enumerable.Empty(); } @@ -241,7 +241,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent } catch (DownloadClientAuthenticationException ex) { - _logger.Error(ex); + _logger.Error(ex, ex.Message); return new NzbDroneValidationFailure("Username", "Authentication failure") { DetailedDescription = "Please verify your username and password." @@ -249,7 +249,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent } catch (WebException ex) { - _logger.Error(ex); + _logger.Error(ex, "Unable to connect to qBittorrent"); if (ex.Status == WebExceptionStatus.ConnectFailure) { return new NzbDroneValidationFailure("Host", "Unable to connect") @@ -261,7 +261,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent } catch (Exception ex) { - _logger.Error(ex); + _logger.Error(ex, "Unable to test qBittorrent"); return new NzbDroneValidationFailure(String.Empty, "Unknown exception: " + ex.Message); } @@ -296,7 +296,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent } catch (Exception ex) { - _logger.Error(ex); + _logger.Error(ex, "Failed to test qBittorrent"); return new NzbDroneValidationFailure(String.Empty, "Unknown exception: " + ex.Message); } @@ -311,7 +311,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent } catch (Exception ex) { - _logger.Error(ex); + _logger.Error(ex, "Failed to get torrents"); return new NzbDroneValidationFailure(String.Empty, "Failed to get the list of torrents: " + ex.Message); } diff --git a/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs b/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs index 31b8b248f..26072b33c 100644 --- a/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs +++ b/src/NzbDrone.Core/Download/Clients/Sabnzbd/Sabnzbd.cs @@ -57,7 +57,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd } catch (DownloadClientException ex) { - _logger.Warn("Couldn't get download queue. {0}", ex.Message); + _logger.Warn(ex, "Couldn't get download queue. {0}", ex.Message); return Enumerable.Empty(); } @@ -120,7 +120,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd } catch (DownloadClientException ex) { - _logger.Error(ex); + _logger.Warn(ex, "Couldn't get download queue. {0}", ex.Message); return Enumerable.Empty(); } @@ -387,7 +387,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd } catch (Exception ex) { - _logger.Error(ex); + _logger.Error(ex, ex.Message); return new ValidationFailure("Host", "Unable to connect to SABnzbd"); } } diff --git a/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionBase.cs b/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionBase.cs index 6a1f701b3..4dae1d494 100644 --- a/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionBase.cs +++ b/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionBase.cs @@ -41,7 +41,7 @@ namespace NzbDrone.Core.Download.Clients.Transmission } catch (DownloadClientException ex) { - _logger.Error(ex); + _logger.Error(ex, ex.Message); return Enumerable.Empty(); } @@ -205,7 +205,7 @@ namespace NzbDrone.Core.Download.Clients.Transmission } catch (DownloadClientAuthenticationException ex) { - _logger.Error(ex); + _logger.Error(ex, ex.Message); return new NzbDroneValidationFailure("Username", "Authentication failure") { DetailedDescription = string.Format("Please verify your username and password. Also verify if the host running Lidarr isn't blocked from accessing {0} by WhiteList limitations in the {0} configuration.", Name) @@ -213,7 +213,7 @@ namespace NzbDrone.Core.Download.Clients.Transmission } catch (WebException ex) { - _logger.Error(ex); + _logger.Error(ex, ex.Message); if (ex.Status == WebExceptionStatus.ConnectFailure) { return new NzbDroneValidationFailure("Host", "Unable to connect") @@ -225,7 +225,7 @@ namespace NzbDrone.Core.Download.Clients.Transmission } catch (Exception ex) { - _logger.Error(ex); + _logger.Error(ex, "Failed to test"); return new NzbDroneValidationFailure(string.Empty, "Unknown exception: " + ex.Message); } } @@ -240,7 +240,7 @@ namespace NzbDrone.Core.Download.Clients.Transmission } catch (Exception ex) { - _logger.Error(ex); + _logger.Error(ex, "Failed to get torrents"); return new NzbDroneValidationFailure(string.Empty, "Failed to get the list of torrents: " + ex.Message); } diff --git a/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrent.cs b/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrent.cs index a494584c9..24f7bfacc 100644 --- a/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrent.cs +++ b/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrent.cs @@ -140,7 +140,7 @@ namespace NzbDrone.Core.Download.Clients.RTorrent } catch (DownloadClientException ex) { - _logger.Error(ex); + _logger.Error(ex, ex.Message); return Enumerable.Empty(); } @@ -189,7 +189,7 @@ namespace NzbDrone.Core.Download.Clients.RTorrent } catch (Exception ex) { - _logger.Error(ex); + _logger.Error(ex, "Failed to test rTorrent"); return new NzbDroneValidationFailure(string.Empty, "Unknown exception: " + ex.Message); } @@ -204,7 +204,7 @@ namespace NzbDrone.Core.Download.Clients.RTorrent } catch (Exception ex) { - _logger.Error(ex); + _logger.Error(ex, "Failed to get torrents"); return new NzbDroneValidationFailure(string.Empty, "Failed to get the list of torrents: " + ex.Message); } diff --git a/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrent.cs b/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrent.cs index 04c8b5240..208f9816a 100644 --- a/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrent.cs +++ b/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrent.cs @@ -105,7 +105,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent } catch (DownloadClientException ex) { - _logger.Error(ex); + _logger.Error(ex, ex.Message); return Enumerable.Empty(); } @@ -232,7 +232,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent } catch (DownloadClientAuthenticationException ex) { - _logger.Error(ex); + _logger.Error(ex, ex.Message); return new NzbDroneValidationFailure("Username", "Authentication failure") { DetailedDescription = "Please verify your username and password." @@ -240,7 +240,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent } catch (WebException ex) { - _logger.Error(ex); + _logger.Error(ex, "Unable to connect to uTorrent"); if (ex.Status == WebExceptionStatus.ConnectFailure) { return new NzbDroneValidationFailure("Host", "Unable to connect") @@ -252,7 +252,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent } catch (Exception ex) { - _logger.Error(ex); + _logger.Error(ex, "Failed to test uTorrent"); return new NzbDroneValidationFailure(string.Empty, "Unknown exception: " + ex.Message); } @@ -267,7 +267,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent } catch (Exception ex) { - _logger.Error(ex); + _logger.Error(ex, "Failed to get torrents"); return new NzbDroneValidationFailure(string.Empty, "Failed to get the list of torrents: " + ex.Message); } diff --git a/src/NzbDrone.Core/Messaging/Commands/CommandExecutor.cs b/src/NzbDrone.Core/Messaging/Commands/CommandExecutor.cs index 3a577a287..6ce968954 100644 --- a/src/NzbDrone.Core/Messaging/Commands/CommandExecutor.cs +++ b/src/NzbDrone.Core/Messaging/Commands/CommandExecutor.cs @@ -48,7 +48,7 @@ namespace NzbDrone.Core.Messaging.Commands } catch (ThreadAbortException ex) { - _logger.Error(ex); + _logger.Error(ex, "Thread aborted"); Thread.ResetAbort(); } catch (Exception ex)