mirror of https://github.com/Radarr/Radarr
ExceptioneerTarget Tweaks
This commit is contained in:
parent
288359627e
commit
2e174c03c9
|
@ -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,8 +11,9 @@ namespace NzbDrone.Core.Instrumentation
|
||||||
|
|
||||||
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
|
new Client
|
||||||
|
@ -22,7 +22,7 @@ namespace NzbDrone.Core.Instrumentation
|
||||||
ApplicationName = "NZBDrone",
|
ApplicationName = "NZBDrone",
|
||||||
CurrentException = logEvent.Exception
|
CurrentException = logEvent.Exception
|
||||||
}.Submit();
|
}.Submit();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue