mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
New: NzbDrone service to automatically report errors and episode parse issues.
This commit is contained in:
parent
ea86ce2fcb
commit
174f765ec9
140 changed files with 10774 additions and 1694 deletions
|
@ -3,6 +3,7 @@ using System.IO;
|
|||
using NLog;
|
||||
using NLog.Config;
|
||||
using NLog.Targets;
|
||||
using NzbDrone.Common.NlogTargets;
|
||||
|
||||
namespace NzbDrone.Common
|
||||
{
|
||||
|
@ -94,7 +95,7 @@ namespace NzbDrone.Common
|
|||
{
|
||||
var fileTarget = GetBaseTarget();
|
||||
fileTarget.FileName = fileName;
|
||||
|
||||
|
||||
LogManager.Configuration.AddTarget(Guid.NewGuid().ToString(), fileTarget);
|
||||
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", level, fileTarget));
|
||||
}
|
||||
|
@ -112,7 +113,7 @@ namespace NzbDrone.Common
|
|||
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", level, fileTarget));
|
||||
}
|
||||
|
||||
public static void RegisterExceptioneer()
|
||||
public static void RegisterRemote()
|
||||
{
|
||||
if (EnviromentProvider.IsProduction)
|
||||
{
|
||||
|
@ -121,14 +122,25 @@ namespace NzbDrone.Common
|
|||
var exTarget = new ExceptioneerTarget();
|
||||
LogManager.Configuration.AddTarget("Exceptioneer", exTarget);
|
||||
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", LogLevel.Trace, exTarget));
|
||||
|
||||
LogManager.ConfigurationReloaded += (sender, args) => RegisterExceptioneer();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e);
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var remoteTarget = new RemoteTarget();
|
||||
LogManager.Configuration.AddTarget("RemoteTarget", remoteTarget);
|
||||
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", LogLevel.Trace, remoteTarget));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e);
|
||||
}
|
||||
|
||||
LogManager.ConfigurationReloaded += (sender, args) => RegisterRemote();
|
||||
}
|
||||
|
||||
public static void Reload()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue