1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-09 12:32:31 +01:00
Radarr/NzbDrone.Common/NlogTargets/RemoteTarget.cs

21 lines
601 B
C#

using System.Linq;
using System.Diagnostics;
using NLog;
using NLog.Targets;
namespace NzbDrone.Common.NlogTargets
{
public class RemoteTarget : Target
{
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
protected override void Write(LogEventInfo logEvent)
{
if (logEvent == null || logEvent.Exception == null) return;
logger.Trace("Sending Exception to Service.NzbDrone.com . Process Name: {0}", Process.GetCurrentProcess().ProcessName);
ReportingService.ReportException(logEvent);
}
}
}