From 22db06de97d43f10e984059ff3e63e66a3276a01 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 7 Nov 2013 08:20:19 -0800 Subject: [PATCH] Log response from SAB (trace) --- .../Download/Clients/Sabnzbd/SabCommunicationProxy.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabCommunicationProxy.cs b/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabCommunicationProxy.cs index f1d348b17..9da0d90ac 100644 --- a/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabCommunicationProxy.cs +++ b/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabCommunicationProxy.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using NLog; using NzbDrone.Common.Serializer; using NzbDrone.Core.Configuration; using RestSharp; @@ -16,10 +17,12 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd public class SabCommunicationProxy : ISabCommunicationProxy { private readonly IConfigService _configService; + private readonly Logger _logger; - public SabCommunicationProxy(IConfigService configService) + public SabCommunicationProxy(IConfigService configService, Logger logger) { _configService = configService; + _logger = logger; } public string DownloadNzb(Stream nzb, string title, string category, int priority) @@ -44,7 +47,8 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd { var client = BuildClient(action); var response = client.Execute(restRequest); - + _logger.Trace("Response: {0}", response); + CheckForError(response); return response.Content;