mirror of
https://github.com/Radarr/Radarr
synced 2025-01-30 19:31:35 +00:00
ExceptioneerTarget Tweaks
This commit is contained in:
parent
288359627e
commit
2e174c03c9
1 changed files with 12 additions and 12 deletions
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using System.Diagnostics;
|
||||||
using System.Diagnostics;
|
|
||||||
using Exceptioneer.WindowsFormsClient;
|
using Exceptioneer.WindowsFormsClient;
|
||||||
using NLog;
|
using NLog;
|
||||||
using NLog.Targets;
|
using NLog.Targets;
|
||||||
|
@ -12,17 +11,18 @@ public class ExceptioneerTarget : Target
|
||||||
|
|
||||||
protected override void Write(LogEventInfo logEvent)
|
protected override void Write(LogEventInfo logEvent)
|
||||||
{
|
{
|
||||||
if (!Debugger.IsAttached && !Process.GetCurrentProcess().ProcessName.Contains("JetBrains"))
|
if (logEvent == null || logEvent.Exception == null) return;
|
||||||
{
|
if (Debugger.IsAttached || Process.GetCurrentProcess().ProcessName.Contains("JetBrains")) return;
|
||||||
Logger.Trace("Sending Exception to Exceptioneer. {0}", Process.GetCurrentProcess().ProcessName);
|
|
||||||
|
Logger.Trace("Sending Exception to Exceptioneer. {0}", Process.GetCurrentProcess().ProcessName);
|
||||||
|
|
||||||
|
new Client
|
||||||
|
{
|
||||||
|
ApiKey = "43BBF60A-EB2A-4C1C-B09E-422ADF637265",
|
||||||
|
ApplicationName = "NZBDrone",
|
||||||
|
CurrentException = logEvent.Exception
|
||||||
|
}.Submit();
|
||||||
|
|
||||||
new Client
|
|
||||||
{
|
|
||||||
ApiKey = "43BBF60A-EB2A-4C1C-B09E-422ADF637265",
|
|
||||||
ApplicationName = "NZBDrone",
|
|
||||||
CurrentException = logEvent.Exception
|
|
||||||
}.Submit();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue