mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-30 15:32:31 +01:00
Log response from SAB (trace)
This commit is contained in:
parent
d111be17ad
commit
22db06de97
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using NLog;
|
||||||
using NzbDrone.Common.Serializer;
|
using NzbDrone.Common.Serializer;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
using RestSharp;
|
using RestSharp;
|
||||||
@ -16,10 +17,12 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
|
|||||||
public class SabCommunicationProxy : ISabCommunicationProxy
|
public class SabCommunicationProxy : ISabCommunicationProxy
|
||||||
{
|
{
|
||||||
private readonly IConfigService _configService;
|
private readonly IConfigService _configService;
|
||||||
|
private readonly Logger _logger;
|
||||||
|
|
||||||
public SabCommunicationProxy(IConfigService configService)
|
public SabCommunicationProxy(IConfigService configService, Logger logger)
|
||||||
{
|
{
|
||||||
_configService = configService;
|
_configService = configService;
|
||||||
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string DownloadNzb(Stream nzb, string title, string category, int priority)
|
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 client = BuildClient(action);
|
||||||
var response = client.Execute(restRequest);
|
var response = client.Execute(restRequest);
|
||||||
|
_logger.Trace("Response: {0}", response);
|
||||||
|
|
||||||
CheckForError(response);
|
CheckForError(response);
|
||||||
|
|
||||||
return response.Content;
|
return response.Content;
|
||||||
|
Loading…
Reference in New Issue
Block a user