Updated NLog to v4.2.3.

pull/923/merge
Taloth Saldono 9 years ago
parent e01b2ef25c
commit 6a90035a4c

@ -51,8 +51,9 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="NLog">
<HintPath>..\packages\NLog.2.1.0\lib\net40\NLog.dll</HintPath>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.2.3\lib\net40\NLog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@ -79,6 +80,7 @@
</ItemGroup>
<ItemGroup>
<None Include="fastJSON\license.txt" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NLog" version="2.1.0" targetFramework="net40" />
</packages>
<package id="NLog" version="4.2.3" targetFramework="net40" />
</packages>

@ -26,7 +26,7 @@ namespace NzbDrone.Api.ErrorManagement
if (apiException != null)
{
_logger.WarnException("API Error", apiException);
_logger.Warn(apiException, "API Error");
return apiException.ToErrorResponse();
}
@ -65,10 +65,10 @@ namespace NzbDrone.Api.ErrorManagement
var sqlErrorMessage = string.Format("[{0} {1}]", context.Request.Method, context.Request.Path);
_logger.ErrorException(sqlErrorMessage, sqLiteException);
_logger.Error(sqLiteException, sqlErrorMessage);
}
_logger.FatalException("Request Failed", exception);
_logger.Fatal(exception, "Request Failed");
return new ErrorModel
{

@ -60,7 +60,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
catch (Exception ex)
{
_logger.ErrorException("Unable to gzip response", ex);
_logger.Error(ex, "Unable to gzip response");
throw;
}
}

@ -68,7 +68,7 @@ namespace NzbDrone.Api.Indexers
}
catch (ReleaseDownloadException ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
throw new NzbDroneClientException(HttpStatusCode.Conflict, "Getting release from indexer failed");
}
@ -96,7 +96,7 @@ namespace NzbDrone.Api.Indexers
}
catch (Exception ex)
{
_logger.ErrorException("Episode search failed: " + ex.Message, ex);
_logger.Error(ex, "Episode search failed: " + ex.Message);
}
return new List<ReleaseResource>();

@ -59,6 +59,10 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.6.0.6\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.2.3\lib\net40\NLog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
@ -66,9 +70,6 @@
<Reference Include="DDay.iCal">
<HintPath>..\packages\DDay.iCal.1.0.2.575\lib\DDay.iCal.dll</HintPath>
</Reference>
<Reference Include="NLog">
<HintPath>..\packages\NLog.2.1.0\lib\net40\NLog.dll</HintPath>
</Reference>
<Reference Include="Omu.ValueInjecter">
<HintPath>..\packages\ValueInjecter.2.3.3\lib\net35\Omu.ValueInjecter.dll</HintPath>
</Reference>
@ -278,4 +279,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

@ -6,6 +6,6 @@
<package id="Nancy.Authentication.Basic" version="0.23.2" targetFramework="net40" />
<package id="Nancy.Authentication.Forms" version="0.23.2" targetFramework="net40" />
<package id="Newtonsoft.Json" version="6.0.6" targetFramework="net40" />
<package id="NLog" version="2.1.0" targetFramework="net40" />
<package id="NLog" version="4.2.3" targetFramework="net40" />
<package id="ValueInjecter" version="2.3.3" targetFramework="net40" />
</packages>

@ -45,6 +45,10 @@
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net40\FluentAssertions.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.2.3\lib\net40\NLog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
@ -60,9 +64,6 @@
<Reference Include="Moq">
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
</Reference>
<Reference Include="NLog">
<HintPath>..\packages\NLog.2.1.0\lib\net40\NLog.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ContainerFixture.cs" />

@ -3,6 +3,6 @@
<package id="FluentAssertions" version="4.2.1" targetFramework="net40" />
<package id="Moq" version="4.0.10827" />
<package id="NBuilder" version="3.0.1.1" />
<package id="NLog" version="2.1.0" targetFramework="net40" />
<package id="NLog" version="4.2.3" targetFramework="net40" />
<package id="NUnit" version="2.6.3" targetFramework="net40" />
</packages>

@ -46,6 +46,10 @@
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net40\FluentAssertions.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.2.3\lib\net40\NLog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
@ -58,9 +62,6 @@
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="NLog">
<HintPath>..\packages\NLog.2.1.0\lib\net40\NLog.dll</HintPath>
</Reference>
<Reference Include="WebDriver, Version=2.48.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Selenium.WebDriver.2.48.0\lib\net40\WebDriver.dll</HintPath>
@ -102,4 +103,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FluentAssertions" version="4.2.1" targetFramework="net40" />
<package id="NLog" version="2.1.0" targetFramework="net40" />
<package id="NLog" version="4.2.3" targetFramework="net40" />
<package id="NUnit" version="2.6.3" targetFramework="net40" />
<package id="Selenium.Support" version="2.48.0" targetFramework="net40" />
<package id="Selenium.WebDriver" version="2.48.0" targetFramework="net40" />

@ -45,6 +45,10 @@
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net40\FluentAssertions.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.2.3\lib\net40\NLog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
@ -60,9 +64,6 @@
<Reference Include="Moq">
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
</Reference>
<Reference Include="NLog">
<HintPath>..\packages\NLog.2.1.0\lib\net40\NLog.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="CacheTests\CachedFixture.cs" />
@ -151,4 +152,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

@ -2,6 +2,6 @@
<packages>
<package id="FluentAssertions" version="4.2.1" targetFramework="net40" />
<package id="Moq" version="4.0.10827" />
<package id="NLog" version="2.1.0" targetFramework="net40" />
<package id="NLog" version="4.2.3" targetFramework="net40" />
<package id="NUnit" version="2.6.3" targetFramework="net40" />
</packages>

@ -304,7 +304,7 @@ namespace NzbDrone.Common.Disk
}
catch (Exception e)
{
Logger.WarnException(string.Format("Couldn't set permission for {0}. account:{1} rights:{2} accessControlType:{3}", filename, accountSid, rights, controlType), e);
Logger.Warn(e, string.Format("Couldn't set permission for {0}. account:{1} rights:{2} accessControlType:{3}", filename, accountSid, rights, controlType));
throw;
}
@ -394,7 +394,7 @@ namespace NzbDrone.Common.Disk
}
catch (Exception ex)
{
Logger.DebugException(string.Format("Failed to get mount for path {0}", path), ex);
Logger.Debug(ex, string.Format("Failed to get mount for path {0}", path));
return null;
}
}

@ -259,7 +259,7 @@ namespace NzbDrone.Common.Disk
}
catch (Exception ex)
{
_logger.ErrorException(string.Format("Failed to properly rollback the file move [{0}] to [{1}], incomplete file may be left in target path.", sourcePath, targetPath), ex);
_logger.Error(ex, string.Format("Failed to properly rollback the file move [{0}] to [{1}], incomplete file may be left in target path.", sourcePath, targetPath));
}
}
@ -275,7 +275,7 @@ namespace NzbDrone.Common.Disk
}
catch (Exception ex)
{
_logger.ErrorException(string.Format("Failed to properly rollback the file move [{0}] to [{1}], file may be left in target path.", sourcePath, targetPath), ex);
_logger.Error(ex, string.Format("Failed to properly rollback the file move [{0}] to [{1}], file may be left in target path.", sourcePath, targetPath));
}
}
@ -294,7 +294,7 @@ namespace NzbDrone.Common.Disk
}
catch (Exception ex)
{
_logger.ErrorException(string.Format("Failed to properly rollback the file copy [{0}] to [{1}], file may be left in target path.", sourcePath, targetPath), ex);
_logger.Error(ex, string.Format("Failed to properly rollback the file copy [{0}] to [{1}], file may be left in target path.", sourcePath, targetPath));
}
}

@ -43,7 +43,7 @@ namespace NzbDrone.Common.EnvironmentInfo
}
catch (Exception ex)
{
_logger.WarnException("Coudn't set app folder permission", ex);
_logger.Warn(ex, "Coudn't set app folder permission");
}
}
}

@ -60,7 +60,7 @@ namespace NzbDrone.Common.EnvironmentInfo
}
catch (Exception ex)
{
_logger.WarnException("Error checking if the current user is an administrator.", ex);
_logger.Warn(ex, "Error checking if the current user is an administrator.");
return false;
}
}

@ -29,7 +29,7 @@ namespace NzbDrone.Common.Http.Dispatchers
}
catch (Exception ex)
{
_logger.TraceException("Initializing curl failed", ex);
_logger.Trace(ex, "Initializing curl failed");
return false;
}
}

@ -177,7 +177,7 @@ namespace NzbDrone.Common.Http
}
catch (Exception e)
{
_logger.WarnException("Failed to get response from: " + url, e);
_logger.Warn(e, "Failed to get response from: " + url);
throw;
}
}

@ -53,7 +53,7 @@ namespace NzbDrone.Common.Http
}
catch (Exception e)
{
_logger.WarnException("Failed to get response from: " + url, e);
_logger.Warn(e, "Failed to get response from: " + url);
throw;
}
}

@ -19,7 +19,7 @@ namespace NzbDrone.Common.Instrumentation
var exception = e.Exception;
Console.WriteLine("Task Error: {0}", exception);
Logger.ErrorException("Task Error: " + exception.Message, exception);
Logger.Error(exception, "Task Error: " + exception.Message);
}
private static void HandleAppDomainException(object sender, UnhandledExceptionEventArgs e)
@ -40,13 +40,13 @@ namespace NzbDrone.Common.Instrumentation
if (exception is TypeInitializationException && exception.InnerException is DllNotFoundException ||
exception is DllNotFoundException)
{
Logger.DebugException("Minor Fail: " + exception.Message, exception);
Logger.Debug(exception, "Minor Fail: " + exception.Message);
return;
}
}
Console.WriteLine("EPIC FAIL: {0}", exception);
Logger.FatalException("EPIC FAIL: " + exception.Message, exception);
Logger.Fatal(exception, "EPIC FAIL: " + exception.Message);
}
}
}

@ -43,6 +43,10 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.6.0.6\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.2.3\lib\net40\NLog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Configuration.Install" />
@ -53,9 +57,6 @@
<Reference Include="ICSharpCode.SharpZipLib">
<HintPath>..\packages\ICSharpCode.SharpZipLib.Patched.0.86.5\lib\net20\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
<Reference Include="NLog">
<HintPath>..\packages\NLog.2.1.0\lib\net40\NLog.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>

@ -37,7 +37,7 @@ namespace NzbDrone.Common.Processes
}
catch (Exception ex)
{
_logger.ErrorException("Unable to write PID file: " + filename, ex);
_logger.Error(ex, "Unable to write PID file: " + filename);
throw;
}
}

@ -292,7 +292,7 @@ namespace NzbDrone.Common.Processes
}
catch (Win32Exception e)
{
_logger.WarnException("Couldn't get process info for " + process.ProcessName, e);
_logger.Warn(e, "Couldn't get process info for " + process.ProcessName);
}
return processInfo;

@ -17,7 +17,7 @@ namespace NzbDrone.Common.TPL
var aggregateException = t.Exception.Flatten();
foreach (var exception in aggregateException.InnerExceptions)
{
Logger.ErrorException("Task Error", exception);
Logger.Error(exception, "Task Error");
}
}
}, TaskContinuationOptions.OnlyOnFaulted);

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="6.0.6" targetFramework="net40" />
<package id="NLog" version="2.1.0" targetFramework="net40" />
<package id="ICSharpCode.SharpZipLib.Patched" version="0.86.5" targetFramework="net40" />
<package id="Newtonsoft.Json" version="6.0.6" targetFramework="net40" />
<package id="NLog" version="4.2.3" targetFramework="net40" />
</packages>

@ -32,7 +32,7 @@ namespace NzbDrone.Console
{
System.Console.WriteLine("");
System.Console.WriteLine("");
Logger.FatalException("EPIC FAIL!", e);
Logger.Fatal(e, "EPIC FAIL!");
System.Console.WriteLine("Press any key to exit...");
System.Console.ReadLine();
Environment.Exit(1);

@ -75,11 +75,12 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.6.0.6\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.2.3\lib\net40\NLog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="NLog">
<HintPath>..\packages\NLog.2.1.0\lib\net40\NLog.dll</HintPath>
</Reference>
<Reference Include="Owin">
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
</Reference>
@ -150,4 +151,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

@ -3,6 +3,6 @@
<package id="Microsoft.Owin" version="2.1.0" targetFramework="net40" />
<package id="Microsoft.Owin.Hosting" version="2.1.0" targetFramework="net40" />
<package id="Newtonsoft.Json" version="6.0.6" targetFramework="net40" />
<package id="NLog" version="2.1.0" targetFramework="net40" />
<package id="NLog" version="4.2.3" targetFramework="net40" />
<package id="Owin" version="1.0" targetFramework="net40" />
</packages>
</packages>

@ -83,7 +83,7 @@ namespace NzbDrone.Core.Test.InstrumentationTests
{
var ex = new InvalidOperationException("Fake Exception");
_logger.ErrorException(_uniqueMessage, ex);
_logger.Error(ex, _uniqueMessage);
VerifyLog(StoredModel, LogLevel.Error);
@ -102,7 +102,7 @@ namespace NzbDrone.Core.Test.InstrumentationTests
_uniqueMessage = string.Empty;
_logger.ErrorException(_uniqueMessage, ex);
_logger.Error(ex, _uniqueMessage);
StoredModel.Message.Should().Be(ex.Message);

@ -68,6 +68,10 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.6.0.6\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.2.3\lib\net40\NLog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
@ -96,9 +100,6 @@
<Reference Include="NCrunch.Framework">
<HintPath>..\packages\NCrunch.Framework.1.46.0.9\lib\net35\NCrunch.Framework.dll</HintPath>
</Reference>
<Reference Include="NLog">
<HintPath>..\packages\NLog.2.1.0\lib\net40\NLog.dll</HintPath>
</Reference>
<Reference Include="Prowlin">
<HintPath>..\packages\Prowlin.0.9.4456.26422\lib\net40\Prowlin.dll</HintPath>
</Reference>
@ -554,4 +555,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

@ -10,7 +10,7 @@
<package id="NBuilder" version="3.0.1.1" />
<package id="NCrunch.Framework" version="1.46.0.9" targetFramework="net40" />
<package id="Newtonsoft.Json" version="6.0.6" targetFramework="net40" />
<package id="NLog" version="2.1.0" targetFramework="net40" />
<package id="NLog" version="4.2.3" targetFramework="net40" />
<package id="NUnit" version="2.6.3" targetFramework="net40" />
<package id="Prowlin" version="0.9.4456.26422" targetFramework="net40" />
<package id="Unity" version="2.1.505.2" targetFramework="net40" />

@ -35,7 +35,7 @@ namespace NzbDrone.Core.DataAugmentation.DailySeries
}
catch (Exception ex)
{
_logger.WarnException("Failed to get Daily Series", ex);
_logger.Warn(ex, "Failed to get Daily Series");
return new List<int>();
}
}

@ -139,7 +139,7 @@ namespace NzbDrone.Core.DataAugmentation.Scene
}
catch (Exception ex)
{
_logger.ErrorException("Failed to Update Scene Mappings:", ex);
_logger.Error(ex, "Failed to Update Scene Mappings:");
}
}

@ -84,7 +84,7 @@ namespace NzbDrone.Core.DataAugmentation.Xem
}
catch (Exception ex)
{
_logger.ErrorException("Error updating scene numbering mappings for: " + series, ex);
_logger.Error(ex, "Error updating scene numbering mappings for: " + series);
}
}

@ -50,7 +50,7 @@ namespace NzbDrone.Core.Datastore
}
catch (Exception e)
{
_logger.ErrorException("An Error occurred while vacuuming database.", e);
_logger.Error(e, "An Error occurred while vacuuming database.");
}
}
}

@ -47,7 +47,7 @@ namespace NzbDrone.Core.Datastore.Migration.Framework
public void Error(Exception exception)
{
_logger.ErrorException(exception.Message, exception);
_logger.Error(exception, exception.Message);
}
public void Write(string message, bool escaped)

@ -95,7 +95,7 @@ namespace NzbDrone.Core.DecisionEngine
}
catch (Exception e)
{
_logger.ErrorException("Couldn't process release.", e);
_logger.Error(e, "Couldn't process release.");
}
reportNumber++;
@ -140,7 +140,7 @@ namespace NzbDrone.Core.DecisionEngine
{
e.Data.Add("report", remoteEpisode.Release.ToJson());
e.Data.Add("parsed", remoteEpisode.ParsedEpisodeInfo.ToJson());
_logger.ErrorException("Couldn't evaluate decision on " + remoteEpisode.Release.Title, e);
_logger.Error(e, "Couldn't evaluate decision on " + remoteEpisode.Release.Title);
return new Rejection(string.Format("{0}: {1}", spec.GetType().Name, e.Message));
}

@ -91,7 +91,7 @@ namespace NzbDrone.Core.DiskSpace
{
if (!suppressWarnings)
{
_logger.WarnException("Unable to get free space for: " + path, ex);
_logger.Warn(ex, "Unable to get free space for: " + path);
}
}

@ -100,7 +100,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge
}
catch (DownloadClientException ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return Enumerable.Empty<DownloadClientItem>();
}
@ -204,12 +204,12 @@ namespace NzbDrone.Core.Download.Clients.Deluge
}
catch (DownloadClientAuthenticationException ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return new NzbDroneValidationFailure("Password", "Authentication failed");
}
catch (WebException ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
switch (ex.Status)
{
case WebExceptionStatus.ConnectFailure:
@ -233,7 +233,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge
}
catch (Exception ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return new NzbDroneValidationFailure(string.Empty, "Unknown exception: " + ex.Message);
}
@ -284,7 +284,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge
}
catch (Exception ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return new NzbDroneValidationFailure(string.Empty, "Failed to get the list of torrents: " + ex.Message);
}

@ -172,7 +172,7 @@ namespace NzbDrone.Core.Download.Clients.NzbVortex
}
catch (Exception ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return new ValidationFailure("Host", "Unable to connect to NZBVortex");
}
@ -193,7 +193,7 @@ namespace NzbDrone.Core.Download.Clients.NzbVortex
}
catch (Exception ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return new ValidationFailure("Host", "Unable to connect to NZBVortex");
}

@ -56,7 +56,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
}
catch (DownloadClientException ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return Enumerable.Empty<DownloadClientItem>();
}
@ -120,7 +120,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
}
catch (DownloadClientException ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return Enumerable.Empty<DownloadClientItem>();
}
@ -284,7 +284,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
{
return new ValidationFailure("Username", "Authentication failed");
}
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return new ValidationFailure("Host", "Unable to connect to NZBGet");
}

@ -107,7 +107,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
}
catch (DownloadClientException ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return Enumerable.Empty<DownloadClientItem>();
}
@ -267,7 +267,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
}
catch (Exception ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return new ValidationFailure("Host", "Unable to connect to SABnzbd");
}

@ -100,7 +100,7 @@ namespace NzbDrone.Core.Download.Clients.Transmission
}
catch (DownloadClientException ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return Enumerable.Empty<DownloadClientItem>();
}
@ -218,7 +218,7 @@ namespace NzbDrone.Core.Download.Clients.Transmission
}
catch (DownloadClientAuthenticationException ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return new NzbDroneValidationFailure("Username", "Authentication failure")
{
DetailedDescription = "Please verify your username and password. Also verify if the host running Sonarr isn't blocked from accessing Transmission by WhiteList limitations in the Transmission configuration."
@ -226,7 +226,7 @@ namespace NzbDrone.Core.Download.Clients.Transmission
}
catch (WebException ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
if (ex.Status == WebExceptionStatus.ConnectFailure)
{
return new NzbDroneValidationFailure("Host", "Unable to connect")
@ -238,7 +238,7 @@ namespace NzbDrone.Core.Download.Clients.Transmission
}
catch (Exception ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return new NzbDroneValidationFailure(string.Empty, "Unknown exception: " + ex.Message);
}
@ -253,7 +253,7 @@ namespace NzbDrone.Core.Download.Clients.Transmission
}
catch (Exception ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return new NzbDroneValidationFailure(string.Empty, "Failed to get the list of torrents: " + ex.Message);
}

@ -98,7 +98,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
}
catch (DownloadClientException ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return Enumerable.Empty<DownloadClientItem>();
}
@ -230,7 +230,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
}
catch (DownloadClientAuthenticationException ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return new NzbDroneValidationFailure("Username", "Authentication failure")
{
DetailedDescription = "Please verify your username and password."
@ -238,7 +238,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
}
catch (WebException ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
if (ex.Status == WebExceptionStatus.ConnectFailure)
{
return new NzbDroneValidationFailure("Host", "Unable to connect")
@ -250,7 +250,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
}
catch (Exception ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return new NzbDroneValidationFailure(String.Empty, "Unknown exception: " + ex.Message);
}
@ -265,7 +265,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
}
catch (Exception ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return new NzbDroneValidationFailure(String.Empty, "Failed to get the list of torrents: " + ex.Message);
}

@ -159,7 +159,7 @@ namespace NzbDrone.Core.Download.Clients.RTorrent
}
catch (DownloadClientException ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return Enumerable.Empty<DownloadClientItem>();
}
@ -208,7 +208,7 @@ namespace NzbDrone.Core.Download.Clients.RTorrent
}
catch (Exception ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return new NzbDroneValidationFailure(string.Empty, "Unknown exception: " + ex.Message);
}
@ -223,7 +223,7 @@ namespace NzbDrone.Core.Download.Clients.RTorrent
}
catch (Exception ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return new NzbDroneValidationFailure(string.Empty, "Failed to get the list of torrents: " + ex.Message);
}

@ -81,7 +81,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent
}
catch (DownloadClientException ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return Enumerable.Empty<DownloadClientItem>();
}
@ -208,7 +208,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent
}
catch (DownloadClientAuthenticationException ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return new NzbDroneValidationFailure("Username", "Authentication failure")
{
DetailedDescription = "Please verify your username and password."
@ -216,7 +216,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent
}
catch (WebException ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
if (ex.Status == WebExceptionStatus.ConnectFailure)
{
return new NzbDroneValidationFailure("Host", "Unable to connect")
@ -228,7 +228,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent
}
catch (Exception ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return new NzbDroneValidationFailure(string.Empty, "Unknown exception: " + ex.Message);
}
@ -243,7 +243,7 @@ namespace NzbDrone.Core.Download.Clients.UTorrent
}
catch (Exception ex)
{
_logger.ErrorException(ex.Message, ex);
_logger.Error(ex, ex.Message);
return new NzbDroneValidationFailure(string.Empty, "Failed to get the list of torrents: " + ex.Message);
}

@ -127,7 +127,7 @@ namespace NzbDrone.Core.Download
}
catch (Exception ex)
{
_logger.WarnException(string.Format("[{0}] Error occurred while trying to delete data from '{1}'.", item.Title, item.OutputPath), ex);
_logger.Warn(ex, string.Format("[{0}] Error occurred while trying to delete data from '{1}'.", item.Title, item.OutputPath));
}
}
@ -141,7 +141,7 @@ namespace NzbDrone.Core.Download
}
catch (Exception ex)
{
_logger.ErrorException("Test aborted due to exception", ex);
_logger.Error(ex, "Test aborted due to exception");
failures.Add(new ValidationFailure(string.Empty, "Test was aborted due to an error: " + ex.Message));
}

@ -74,7 +74,7 @@ namespace NzbDrone.Core.Download
}
catch (Exception e)
{
_logger.ErrorException("Couldn't remove item from client " + trackedDownload.DownloadItem.Title, e);
_logger.Error(e, "Couldn't remove item from client " + trackedDownload.DownloadItem.Title);
}
}
}

@ -78,7 +78,7 @@ namespace NzbDrone.Core.Download
{
//TODO: support for store & forward
//We'll need to differentiate between a download client error and an indexer error
_logger.WarnException("Couldn't add report to download queue. " + remoteEpisode, e);
_logger.Warn(e, "Couldn't add report to download queue. " + remoteEpisode);
}
}

@ -130,15 +130,13 @@ namespace NzbDrone.Core.Download
}
catch (HttpException ex)
{
_logger.ErrorException(string.Format("Downloading torrent file for episode '{0}' failed ({1})",
remoteEpisode.Release.Title, torrentUrl), ex);
_logger.Error(ex, "Downloading torrent file for episode '{0}' failed ({1})", remoteEpisode.Release.Title, torrentUrl);
throw new ReleaseDownloadException(remoteEpisode.Release, "Downloading torrent failed", ex);
}
catch (WebException ex)
{
_logger.ErrorException(string.Format("Downloading torrent file for episode '{0}' failed ({1})",
remoteEpisode.Release.Title, torrentUrl), ex);
_logger.Error(ex, "Downloading torrent file for episode '{0}' failed ({1})", remoteEpisode.Release.Title, torrentUrl);
throw new ReleaseDownloadException(remoteEpisode.Release, "Downloading torrent failed", ex);
}
@ -168,8 +166,7 @@ namespace NzbDrone.Core.Download
}
catch (FormatException ex)
{
_logger.ErrorException(string.Format("Failed to parse magnetlink for episode '{0}': '{1}'",
remoteEpisode.Release.Title, magnetUrl), ex);
_logger.Error(ex, "Failed to parse magnetlink for episode '{0}': '{1}'", remoteEpisode.Release.Title, magnetUrl);
return null;
}

@ -87,7 +87,7 @@ namespace NzbDrone.Core.Download.TrackedDownloads
}
catch (Exception ex)
{
_logger.WarnException("Unable to retrieve queue and history items from " + downloadClient.Definition.Name, ex);
_logger.Warn(ex, "Unable to retrieve queue and history items from " + downloadClient.Definition.Name);
}
foreach (var downloadItem in downloadClientHistory)
@ -135,7 +135,7 @@ namespace NzbDrone.Core.Download.TrackedDownloads
}
catch (Exception e)
{
_logger.ErrorException("Couldn't process tracked download " + downloadItem.Title, e);
_logger.Error(e, "Couldn't process tracked download " + downloadItem.Title);
}
return trackedDownloads;

@ -93,7 +93,7 @@ namespace NzbDrone.Core.Download.TrackedDownloads
}
catch (Exception e)
{
_logger.DebugException("Failed to find episode for " + downloadItem.Title, e);
_logger.Debug(e, "Failed to find episode for " + downloadItem.Title);
return null;
}

@ -53,15 +53,13 @@ namespace NzbDrone.Core.Download
}
catch (HttpException ex)
{
_logger.ErrorException(string.Format("Downloading nzb for episode '{0}' failed ({1})",
remoteEpisode.Release.Title, url), ex);
_logger.Error(ex, "Downloading nzb for episode '{0}' failed ({1})", remoteEpisode.Release.Title, url);
throw new ReleaseDownloadException(remoteEpisode.Release, "Downloading nzb failed", ex);
}
catch (WebException ex)
{
_logger.ErrorException(string.Format("Downloading nzb for episode '{0}' failed ({1})",
remoteEpisode.Release.Title, url), ex);
_logger.Error(ex, "Downloading nzb for episode '{0}' failed ({1})", remoteEpisode.Release.Title, url);
throw new ReleaseDownloadException(remoteEpisode.Release, "Downloading nzb failed", ex);
}

@ -35,7 +35,7 @@ namespace NzbDrone.Core.HealthCheck.Checks
{
var message = String.Format("Unable to communicate with {0}.", downloadClient.Definition.Name);
_logger.ErrorException(message, ex);
_logger.Error(ex, message);
return new HealthCheck(GetType(), HealthCheckResult.Error, message + " " + ex.Message);
}
}

@ -50,7 +50,7 @@ namespace NzbDrone.Core.Housekeeping.Housekeepers
}
catch (Exception e)
{
_logger.ErrorException("Couldn't validate image " + image.RelativePath, e);
_logger.Error(e, "Couldn't validate image " + image.RelativePath);
}
}
}

@ -37,7 +37,7 @@ namespace NzbDrone.Core.Housekeeping
}
catch (Exception ex)
{
_logger.ErrorException("Error running housekeeping task: " + housekeeper.GetType().Name, ex);
_logger.Error(ex, "Error running housekeeping task: " + housekeeper.GetType().Name);
}
}

@ -57,7 +57,7 @@ namespace NzbDrone.Core.IndexerSearch
catch (Exception ex)
{
var message = String.Format("Unable to search for missing episodes in season {0} of [{1}]", season.Key, series.Key);
_logger.ErrorException(message, ex);
_logger.Error(ex, message);
continue;
}
}
@ -71,7 +71,7 @@ namespace NzbDrone.Core.IndexerSearch
catch (Exception ex)
{
var message = String.Format("Unable to search for missing episode: [{0}]", season.First());
_logger.ErrorException(message, ex);
_logger.Error(ex, message);
continue;
}
}

@ -272,7 +272,7 @@ namespace NzbDrone.Core.IndexerSearch
}
catch (Exception e)
{
_logger.ErrorException("Error while searching for " + criteriaBase, e);
_logger.Error(e, "Error while searching for " + criteriaBase);
}
}).LogExceptions());
}

@ -249,13 +249,13 @@ namespace NzbDrone.Core.Indexers
{
_indexerStatusService.RecordFailure(Definition.Id);
var message = string.Format("{0} - {1}", ex.Message, url);
_logger.WarnException(message, ex);
_logger.Warn(ex, message);
}
catch (Exception feedEx)
{
_indexerStatusService.RecordFailure(Definition.Id);
feedEx.Data.Add("FeedUrl", url);
_logger.ErrorException("An error occurred while processing feed. " + url, feedEx);
_logger.Error(feedEx, "An error occurred while processing feed. " + url);
}
return CleanupReleases(releases);
@ -315,19 +315,19 @@ namespace NzbDrone.Core.Indexers
}
catch (UnsupportedFeedException ex)
{
_logger.WarnException("Indexer feed is not supported", ex);
_logger.Warn(ex, "Indexer feed is not supported");
return new ValidationFailure(string.Empty, "Indexer feed is not supported: " + ex.Message);
}
catch (IndexerException ex)
{
_logger.WarnException("Unable to connect to indexer", ex);
_logger.Warn(ex, "Unable to connect to indexer");
return new ValidationFailure(string.Empty, "Unable to connect to indexer. " + ex.Message);
}
catch (Exception ex)
{
_logger.WarnException("Unable to connect to indexer", ex);
_logger.Warn(ex, "Unable to connect to indexer");
return new ValidationFailure(string.Empty, "Unable to connect to indexer, check the log for more details");
}

@ -106,7 +106,7 @@ namespace NzbDrone.Core.Indexers
}
catch (Exception ex)
{
_logger.ErrorException("Test aborted due to exception", ex);
_logger.Error(ex, "Test aborted due to exception");
failures.Add(new ValidationFailure(string.Empty, "Test was aborted due to an error: " + ex.Message));
}

@ -120,7 +120,7 @@ namespace NzbDrone.Core.Indexers.Newznab
}
catch (Exception ex)
{
_logger.WarnException("Unable to connect to indexer: " + ex.Message, ex);
_logger.Warn(ex, "Unable to connect to indexer: " + ex.Message);
return new ValidationFailure(string.Empty, "Unable to connect to indexer, check the log for more details");
}

@ -56,7 +56,7 @@ namespace NzbDrone.Core.Indexers.Newznab
}
catch (Exception ex)
{
_logger.DebugException(string.Format("Failed to get capabilities from {0}: {1}", indexerSettings.Url, ex.Message), ex);
_logger.Debug(ex, string.Format("Failed to get capabilities from {0}: {1}", indexerSettings.Url, ex.Message));
}
return capabilities;

@ -63,7 +63,7 @@ namespace NzbDrone.Core.Indexers
catch (Exception itemEx)
{
itemEx.Data.Add("Item", item.Title());
_logger.ErrorException("An error occurred while processing feed item from " + indexerResponse.Request.Url, itemEx);
_logger.Error(itemEx, "An error occurred while processing feed item from " + indexerResponse.Request.Url);
}
}
@ -277,7 +277,7 @@ namespace NzbDrone.Core.Indexers
}
catch (Exception ex)
{
_logger.DebugException(string.Format("Failed to parse Uri {0}, ignoring.", value), ex);
_logger.Debug(ex, string.Format("Failed to parse Uri {0}, ignoring.", value));
return null;
}
}

@ -50,7 +50,7 @@ namespace NzbDrone.Core.Indexers.TorrentRss
}
catch (Exception ex)
{
_logger.WarnException(string.Format("Unable to connect to indexer {0}: {1}", request.Url, ex.Message), ex);
_logger.Warn(ex, string.Format("Unable to connect to indexer {0}: {1}", request.Url, ex.Message));
return null;
}
@ -100,7 +100,7 @@ namespace NzbDrone.Core.Indexers.TorrentRss
}
catch (Exception ex)
{
_logger.TraceException("Feed wasn't parsable by Ezrss Parser", ex);
_logger.Trace(ex, "Feed wasn't parsable by Ezrss Parser");
return null;
}
}
@ -233,7 +233,7 @@ namespace NzbDrone.Core.Indexers.TorrentRss
}
catch (Exception ex)
{
_logger.DebugException("Unable to parse indexer feed: " + ex.Message, ex);
_logger.Debug(ex, "Unable to parse indexer feed: " + ex.Message);
throw new UnsupportedFeedException("Unable to parse indexer: " + ex.Message);
}
}

@ -111,12 +111,10 @@ namespace NzbDrone.Core.Indexers.Torznab
}
catch (Exception ex)
{
_logger.WarnException("Unable to connect to indexer: " + ex.Message, ex);
_logger.Warn(ex, "Unable to connect to indexer: " + ex.Message);
return new ValidationFailure(string.Empty, "Unable to connect to indexer, check the log for more details");
}
return null;
}
}
}

@ -50,7 +50,7 @@ namespace NzbDrone.Core.Indexers
}
catch (FormatException e)
{
Logger.WarnException("Unable to parse " + dateString, e);
Logger.Warn(e, "Unable to parse " + dateString);
throw;
}
}

@ -103,7 +103,7 @@ namespace NzbDrone.Core.MediaCover
}
catch (Exception e)
{
_logger.ErrorException("Couldn't download media cover for " + series, e);
_logger.Error(e, "Couldn't download media cover for " + series);
}
EnsureResizedCovers(series, cover, !alreadyExists);

@ -155,8 +155,8 @@ namespace NzbDrone.Core.MediaFiles
catch (Exception ex)
{
_logger.WarnException("Unable to apply permissions to: " + path, ex);
_logger.DebugException(ex.Message, ex);
_logger.Warn(ex, "Unable to apply permissions to: " + path);
_logger.Debug(ex, ex.Message);
}
}

@ -135,7 +135,7 @@ namespace NzbDrone.Core.MediaFiles
catch (Exception ex)
{
_logger.WarnException("Unable to set last write time", ex);
_logger.Warn(ex, "Unable to set last write time");
}
_mediaFileAttributeService.SetFilePermissions(destinationFilePath);
@ -206,7 +206,7 @@ namespace NzbDrone.Core.MediaFiles
}
catch (IOException ex)
{
_logger.ErrorException("Unable to create directory: " + directoryName, ex);
_logger.Error(ex, "Unable to create directory: " + directoryName);
}
_mediaFileAttributeService.SetFolderPermissions(directoryName);

@ -114,7 +114,7 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport
}
catch (Exception e)
{
_logger.WarnException("Couldn't import episode " + localEpisode, e);
_logger.Warn(e, "Couldn't import episode " + localEpisode);
importResults.Add(new ImportResult(importDecision, "Failed to import episode"));
}
}

@ -111,7 +111,7 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport
}
catch (Exception e)
{
_logger.ErrorException("Couldn't import file. " + file, e);
_logger.Error(e, "Couldn't import file. " + file);
}
return decision;
@ -140,7 +140,7 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport
{
//e.Data.Add("report", remoteEpisode.Report.ToJson());
//e.Data.Add("parsed", remoteEpisode.ParsedEpisodeInfo.ToJson());
_logger.ErrorException("Couldn't evaluate decision on " + localEpisode.Path, e);
_logger.Error(e, "Couldn't evaluate decision on " + localEpisode.Path);
return new Rejection(string.Format("{0}: {1}", spec.GetType().Name, e.Message));
}

@ -58,7 +58,7 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
}
catch (Exception ex)
{
_logger.ErrorException("Unable to check free disk space while importing: " + localEpisode.Path, ex);
_logger.Error(ex, "Unable to check free disk space while importing: " + localEpisode.Path);
}
return Decision.Accept();

@ -43,12 +43,12 @@ namespace NzbDrone.Core.MediaFiles
if (ex is UnauthorizedAccessException || ex is InvalidOperationException || ex is FileNotFoundException)
{
_logger.Debug("Unable to apply folder permissions to: ", path);
_logger.DebugException(ex.Message, ex);
_logger.Debug(ex, ex.Message);
}
else
{
_logger.Warn("Unable to apply folder permissions to: ", path);
_logger.WarnException(ex.Message, ex);
_logger.Warn(ex, ex.Message);
}
}
}
@ -91,8 +91,8 @@ namespace NzbDrone.Core.MediaFiles
catch (Exception ex)
{
_logger.WarnException("Unable to apply permissions to: " + path, ex);
_logger.DebugException(ex.Message, ex);
_logger.Warn(ex, "Unable to apply permissions to: " + path);
_logger.Debug(ex, ex.Message);
}
}
}

@ -69,7 +69,7 @@ namespace NzbDrone.Core.MediaFiles
catch (Exception ex)
{
var errorMessage = string.Format("Unable to cleanup EpisodeFile in DB: {0}", episodeFile.Id);
_logger.ErrorException(errorMessage, ex);
_logger.Error(ex, errorMessage);
}
}

@ -151,11 +151,11 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
}
catch (DllNotFoundException ex)
{
_logger.ErrorException("mediainfo is required but was not found", ex);
_logger.Error(ex, "mediainfo is required but was not found");
}
catch (Exception ex)
{
_logger.ErrorException("Unable to parse media info from file: " + filename, ex);
_logger.Error(ex, "Unable to parse media info from file: " + filename);
}
finally
{

@ -118,7 +118,7 @@ namespace NzbDrone.Core.MediaFiles
catch (IOException e)
{
var message = string.Format("Unable to move '{0}' to the recycling bin: '{1}'", path, destination);
_logger.ErrorException(message, e);
_logger.Error(e, message);
throw;
}

@ -132,7 +132,7 @@ namespace NzbDrone.Core.MediaFiles
}
catch (Exception ex)
{
_logger.ErrorException("Failed to rename file: " + episodeFilePath, ex);
_logger.Error(ex, "Failed to rename file: " + episodeFilePath);
}
}

@ -135,7 +135,7 @@ namespace NzbDrone.Core.MediaFiles
catch (Exception ex)
{
_logger.WarnException("Unable to set date of file [" + filePath + "]", ex);
_logger.Warn(ex, "Unable to set date of file [" + filePath + "]");
}
}
}
@ -165,7 +165,7 @@ namespace NzbDrone.Core.MediaFiles
catch (Exception ex)
{
ex.ExceptronIgnoreOnMono();
_logger.WarnException("Unable to set date of file [" + filePath + "]", ex);
_logger.Warn(ex, "Unable to set date of file [" + filePath + "]");
}
}

@ -42,18 +42,18 @@ namespace NzbDrone.Core.Messaging.Commands
}
catch (Exception ex)
{
_logger.ErrorException("Error occurred while executing task " + command.Name, ex);
_logger.Error(ex, "Error occurred while executing task " + command.Name);
}
}
}
catch (ThreadAbortException ex)
{
_logger.ErrorException("Thread aborted: " + ex.Message, ex);
_logger.Error(ex, "Thread aborted: " + ex.Message);
Thread.ResetAbort();
}
catch (Exception ex)
{
_logger.ErrorException("Unknown error in thread: " + ex.Message, ex);
_logger.Error(ex, "Unknown error in thread: " + ex.Message);
}
}

@ -58,7 +58,7 @@ namespace NzbDrone.Core.Messaging.Events
}
catch (Exception e)
{
_logger.ErrorException(string.Format("{0} failed while processing [{1}]", handler.GetType().Name, eventName), e);
_logger.Error(e, string.Format("{0} failed while processing [{1}]", handler.GetType().Name, eventName));
}
}

@ -335,7 +335,7 @@ namespace NzbDrone.Core.Metadata.Consumers.Xbmc
}
catch (Exception ex)
{
_logger.ErrorException("Unable to process episode image for file: " + Path.Combine(series.Path, episodeFile.RelativePath), ex);
_logger.Error(ex, "Unable to process episode image for file: " + Path.Combine(series.Path, episodeFile.RelativePath));
return new List<ImageFileResult>();
}

@ -380,7 +380,7 @@ namespace NzbDrone.Core.Metadata
}
catch (Exception e)
{
_logger.ErrorException("Couldn't download image " + url + " for " + series, e);
_logger.Error(e, "Couldn't download image " + url + " for " + series);
}
}

@ -95,7 +95,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
}
catch (Exception ex)
{
_logger.WarnException(ex.Message, ex);
_logger.Warn(ex, ex.Message);
throw new SkyHookException("Search for '{0}' failed. Invalid response received from SkyHook.", title);
}
}

@ -34,7 +34,7 @@ namespace NzbDrone.Core.Notifications.Boxcar
}
catch (BoxcarException ex)
{
_logger.ErrorException("Unable to send message", ex);
_logger.Error(ex, "Unable to send message");
throw new BoxcarException("Unable to send Boxcar notifications");
}
}
@ -53,16 +53,16 @@ namespace NzbDrone.Core.Notifications.Boxcar
{
if (ex.Response.StatusCode == HttpStatusCode.Unauthorized)
{
_logger.ErrorException("Access Token is invalid: " + ex.Message, ex);
_logger.Error(ex, "Access Token is invalid: " + ex.Message);
return new ValidationFailure("Token", "Access Token is invalid");
}
_logger.ErrorException("Unable to send test message: " + ex.Message, ex);
_logger.Error(ex, "Unable to send test message: " + ex.Message);
return new ValidationFailure("Token", "Unable to send test message");
}
catch (Exception ex)
{
_logger.ErrorException("Unable to send test message: " + ex.Message, ex);
_logger.Error(ex, "Unable to send test message: " + ex.Message);
return new ValidationFailure("", "Unable to send test message");
}
}
@ -84,7 +84,7 @@ namespace NzbDrone.Core.Notifications.Boxcar
{
if (ex.Response.StatusCode == HttpStatusCode.Unauthorized)
{
_logger.ErrorException("Access Token is invalid: " + ex.Message, ex);
_logger.Error(ex, "Access Token is invalid: " + ex.Message);
throw;
}

@ -44,7 +44,7 @@ namespace NzbDrone.Core.Notifications.Email
catch(Exception ex)
{
_logger.Error("Error sending email. Subject: {0}", email.Subject);
_logger.DebugException(ex.Message, ex);
_logger.Debug(ex, ex.Message);
}
}
@ -61,7 +61,7 @@ namespace NzbDrone.Core.Notifications.Email
catch (Exception ex)
{
_logger.ErrorException("There was an error sending an email.", ex);
_logger.Error(ex, "There was an error sending an email.");
throw;
}
}
@ -76,7 +76,7 @@ namespace NzbDrone.Core.Notifications.Email
}
catch (Exception ex)
{
_logger.ErrorException("Unable to send test email: " + ex.Message, ex);
_logger.Error(ex, "Unable to send test email: " + ex.Message);
return new ValidationFailure("Server", "Unable to send test email");
}

@ -152,7 +152,7 @@ namespace NzbDrone.Core.Notifications.Growl
}
catch (Exception ex)
{
_logger.ErrorException("Unable to send test message: " + ex.Message, ex);
_logger.Error(ex, "Unable to send test message: " + ex.Message);
return new ValidationFailure("Host", "Unable to send test message");
}

@ -52,7 +52,7 @@ namespace NzbDrone.Core.Notifications.MediaBrowser
}
catch (Exception ex)
{
_logger.ErrorException("Unable to send test message: " + ex.Message, ex);
_logger.Error(ex, "Unable to send test message: " + ex.Message);
return new ValidationFailure("Host", "Unable to send test message: " + ex.Message);
}

@ -107,7 +107,7 @@ namespace NzbDrone.Core.Notifications
catch (Exception ex)
{
_logger.ErrorException("Unable to send OnGrab notification to: " + notification.Definition.Name, ex);
_logger.Error(ex, "Unable to send OnGrab notification to: " + notification.Definition.Name);
}
}
}
@ -136,7 +136,7 @@ namespace NzbDrone.Core.Notifications
catch (Exception ex)
{
_logger.WarnException("Unable to send OnDownload notification to: " + notification.Definition.Name, ex);
_logger.Warn(ex, "Unable to send OnDownload notification to: " + notification.Definition.Name);
}
}
}
@ -155,7 +155,7 @@ namespace NzbDrone.Core.Notifications
catch (Exception ex)
{
_logger.WarnException("Unable to send OnRename notification to: " + notification.Definition.Name, ex);
_logger.Warn(ex, "Unable to send OnRename notification to: " + notification.Definition.Name);
}
}
}

@ -75,7 +75,7 @@ namespace NzbDrone.Core.Notifications.NotifyMyAndroid
}
catch (Exception ex)
{
_logger.ErrorException("Unable to send test message: " + ex.Message, ex);
_logger.Error(ex, "Unable to send test message: " + ex.Message);
return new ValidationFailure("ApiKey", "Unable to send test message");
}

@ -35,7 +35,7 @@ namespace NzbDrone.Core.Notifications.Plex
}
catch(Exception ex)
{
_logger.WarnException("Failed to send notification to Plex Client: " + settings.Host, ex);
_logger.Warn(ex, "Failed to send notification to Plex Client: " + settings.Host);
}
}
@ -67,7 +67,7 @@ namespace NzbDrone.Core.Notifications.Plex
}
catch (Exception ex)
{
_logger.ErrorException("Unable to send test message: " + ex.Message, ex);
_logger.Error(ex, "Unable to send test message: " + ex.Message);
return new ValidationFailure("Host", "Unable to send test message");
}

@ -81,7 +81,7 @@ namespace NzbDrone.Core.Notifications.Plex
catch (SocketException ex)
{
var logMessage = string.Format("Unable to connect to PHT Host: {0}:{1}", Settings.Host, Settings.Port);
_logger.DebugException(logMessage, ex);
_logger.Debug(ex, logMessage);
}
}
}

@ -52,7 +52,7 @@ namespace NzbDrone.Core.Notifications.Plex
catch(Exception ex)
{
_logger.WarnException("Failed to Update Plex host: " + settings.Host, ex);
_logger.Warn(ex, "Failed to Update Plex host: " + settings.Host);
throw;
}
}
@ -86,7 +86,7 @@ namespace NzbDrone.Core.Notifications.Plex
}
catch (Exception ex)
{
_logger.WarnException("Unable to check if partial updates are allowed", ex);
_logger.Warn(ex, "Unable to check if partial updates are allowed");
}
return false;
@ -158,12 +158,12 @@ namespace NzbDrone.Core.Notifications.Plex
}
catch(PlexAuthenticationException ex)
{
_logger.ErrorException("Unable to connect to Plex Server: " + ex.Message, ex);
_logger.Error(ex, "Unable to connect to Plex Server: " + ex.Message);
return new ValidationFailure("Username", "Incorrect username or password");
}
catch (Exception ex)
{
_logger.ErrorException("Unable to connect to Plex Server: " + ex.Message, ex);
_logger.Error(ex, "Unable to connect to Plex Server: " + ex.Message);
return new ValidationFailure("Host", "Unable to connect to Plex Server");
}

@ -49,7 +49,7 @@ namespace NzbDrone.Core.Notifications.Prowl
catch (Exception ex)
{
_logger.DebugException(ex.Message, ex);
_logger.Debug(ex, ex.Message);
_logger.Warn("Invalid API Key: {0}", apiKey);
}
}
@ -75,7 +75,7 @@ namespace NzbDrone.Core.Notifications.Prowl
catch (Exception ex)
{
_logger.DebugException(ex.Message, ex);
_logger.Debug(ex, ex.Message);
_logger.Warn("Invalid API Key: {0}", apiKey);
throw new InvalidApiKeyException("API Key: " + apiKey + " is invalid");
}
@ -94,7 +94,7 @@ namespace NzbDrone.Core.Notifications.Prowl
}
catch (Exception ex)
{
_logger.ErrorException("Unable to send test message: " + ex.Message, ex);
_logger.Error(ex, "Unable to send test message: " + ex.Message);
return new ValidationFailure("ApiKey", "Unable to send test message");
}

@ -41,7 +41,7 @@ namespace NzbDrone.Core.Notifications.PushBullet
}
catch (PushBulletException ex)
{
_logger.ErrorException("Unable to send test message to: " + channelTag, ex);
_logger.Error(ex, "Unable to send test message to: " + channelTag);
error = true;
}
}
@ -60,7 +60,7 @@ namespace NzbDrone.Core.Notifications.PushBullet
}
catch (PushBulletException ex)
{
_logger.ErrorException("Unable to send test message to: " + deviceId, ex);
_logger.Error(ex, "Unable to send test message to: " + deviceId);
error = true;
}
}
@ -75,7 +75,7 @@ namespace NzbDrone.Core.Notifications.PushBullet
}
catch (PushBulletException ex)
{
_logger.ErrorException("Unable to send test message to all devices", ex);
_logger.Error(ex, "Unable to send test message to all devices");
error = true;
}
}
@ -100,16 +100,16 @@ namespace NzbDrone.Core.Notifications.PushBullet
{
if (ex.Response.StatusCode == HttpStatusCode.Unauthorized)
{
_logger.ErrorException("API Key is invalid: " + ex.Message, ex);
_logger.Error(ex, "API Key is invalid: " + ex.Message);
return new ValidationFailure("ApiKey", "API Key is invalid");
}
_logger.ErrorException("Unable to send test message: " + ex.Message, ex);
_logger.Error(ex, "Unable to send test message: " + ex.Message);
return new ValidationFailure("ApiKey", "Unable to send test message");
}
catch (Exception ex)
{
_logger.ErrorException("Unable to send test message: " + ex.Message, ex);
_logger.Error(ex, "Unable to send test message: " + ex.Message);
return new ValidationFailure("", "Unable to send test message");
}
@ -164,7 +164,7 @@ namespace NzbDrone.Core.Notifications.PushBullet
{
if (ex.Response.StatusCode == HttpStatusCode.Unauthorized)
{
_logger.ErrorException("API Key is invalid: " + ex.Message, ex);
_logger.Error(ex, "API Key is invalid: " + ex.Message);
throw;
}

@ -73,30 +73,30 @@ namespace NzbDrone.Core.Notifications.Pushalot
{
if (ex.Response.StatusCode == HttpStatusCode.Unauthorized)
{
_logger.ErrorException("Authentication Token is invalid: " + ex.Message, ex);
_logger.Error(ex, "Authentication Token is invalid: " + ex.Message);
return new ValidationFailure("AuthToken", "Authentication Token is invalid");
}
if (ex.Response.StatusCode == HttpStatusCode.NotAcceptable)
{
_logger.ErrorException("Message limit reached: " + ex.Message, ex);
_logger.Error(ex, "Message limit reached: " + ex.Message);
return new ValidationFailure("AuthToken", "Message limit reached");
}
if (ex.Response.StatusCode == HttpStatusCode.Gone)
{
_logger.ErrorException("Authorization Token is no longer valid: " + ex.Message, ex);
_logger.Error(ex, "Authorization Token is no longer valid: " + ex.Message);
return new ValidationFailure("AuthToken", "Authorization Token is no longer valid, please use a new one.");
}
var response = Json.Deserialize<PushalotResponse>(ex.Response.Content);
_logger.ErrorException("Unable to send test message: " + ex.Message, ex);
_logger.Error(ex, "Unable to send test message: " + ex.Message);
return new ValidationFailure("AuthToken", response.Description);
}
catch (Exception ex)
{
_logger.ErrorException("Unable to send test message: " + ex.Message, ex);
_logger.Error(ex, "Unable to send test message: " + ex.Message);
return new ValidationFailure("", "Unable to send test message");
}

@ -59,7 +59,7 @@ namespace NzbDrone.Core.Notifications.Pushover
}
catch (Exception ex)
{
_logger.ErrorException("Unable to send test message: " + ex.Message, ex);
_logger.Error(ex, "Unable to send test message: " + ex.Message);
return new ValidationFailure("ApiKey", "Unable to send test message");
}

@ -38,7 +38,7 @@ namespace NzbDrone.Core.Notifications.Synology
}
catch (Exception ex)
{
_logger.WarnException("synoindex not available", ex);
_logger.Warn(ex, "synoindex not available");
return false;
}
}

@ -131,7 +131,7 @@ namespace NzbDrone.Core.Notifications.Twitter
}
catch (Exception ex)
{
_logger.ErrorException("Unable to send test message: " + ex.Message, ex);
_logger.Error(ex, "Unable to send test message: " + ex.Message);
return new ValidationFailure("Host", "Unable to send test message");
}
return null;

@ -74,7 +74,7 @@ namespace NzbDrone.Core.Notifications.Xbmc
catch (Exception ex)
{
_logger.DebugException(ex.Message, ex);
_logger.Debug(ex, ex.Message);
}
return new List<ActivePlayer>();
@ -163,7 +163,7 @@ namespace NzbDrone.Core.Notifications.Xbmc
catch (Exception ex)
{
_logger.DebugException(ex.Message, ex);
_logger.Debug(ex, ex.Message);
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save