mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
Lots of initialization, configuration clean up.
This commit is contained in:
parent
62013f6f87
commit
51518787d8
74 changed files with 316 additions and 279 deletions
|
@ -33,6 +33,8 @@ namespace NzbDrone.Common
|
|||
consoleTarget.Layout = "${message} ${exception}";
|
||||
LogManager.Configuration.AddTarget(consoleTarget.GetType().Name, consoleTarget);
|
||||
LogManager.Configuration.LoggingRules.Add(new LoggingRule(loggerNamePattern, minLevel, consoleTarget));
|
||||
|
||||
LogManager.ConfigurationReloaded += (sender, args) => RegisterConsoleLogger(minLevel, loggerNamePattern);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -56,6 +58,8 @@ namespace NzbDrone.Common
|
|||
udpTarget.IncludeNdc = true;
|
||||
LogManager.Configuration.AddTarget(udpTarget.GetType().Name, udpTarget);
|
||||
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", LogLevel.Trace, udpTarget));
|
||||
|
||||
LogManager.ConfigurationReloaded += (sender, args) => RegisterUdpLogger();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -76,6 +80,8 @@ namespace NzbDrone.Common
|
|||
var exTarget = new ExceptioneerTarget();
|
||||
LogManager.Configuration.AddTarget("Exceptioneer", exTarget);
|
||||
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", LogLevel.Error, exTarget));
|
||||
|
||||
LogManager.ConfigurationReloaded += (sender, args) => RegisterExceptioneer();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue