mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
IISExpress is now attached to NZBDrone.exe earlier, which means it should almost have a garanteed termination as soon as the host is killed.
Console logging starts earlier in the app. Moved Default profiles to QualityProvider.
This commit is contained in:
parent
ad89618f58
commit
8686eb5d32
6 changed files with 63 additions and 67 deletions
|
@ -1,6 +1,7 @@
|
|||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using Ninject;
|
||||
using Ninject.Activation;
|
||||
using NLog;
|
||||
using NLog.Config;
|
||||
|
||||
|
@ -17,12 +18,13 @@ namespace NzbDrone.Core.Instrumentation
|
|||
|
||||
LogManager.Configuration = new XmlLoggingConfiguration(Path.Combine(CentralDispatch.AppPath, "log.config"),
|
||||
false);
|
||||
LogManager.ConfigurationReloaded += ((s, e) => BindCustomLoggers());
|
||||
BindCustomLoggers();
|
||||
|
||||
LogManager.ConfigurationReloaded += ((s, e) => StartDbLogging());
|
||||
}
|
||||
|
||||
private static void BindCustomLoggers()
|
||||
public static void StartDbLogging()
|
||||
{
|
||||
|
||||
#if Release
|
||||
var exTarget = new ExceptioneerTarget();
|
||||
LogManager.Configuration.AddTarget("Exceptioneer", exTarget);
|
||||
|
@ -30,7 +32,7 @@ namespace NzbDrone.Core.Instrumentation
|
|||
#endif
|
||||
var sonicTarget = CentralDispatch.NinjectKernel.Get<SubsonicTarget>();
|
||||
LogManager.Configuration.AddTarget("DbLogger", sonicTarget);
|
||||
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", NLog.LogLevel.Info, sonicTarget));
|
||||
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", LogLevel.Info, sonicTarget));
|
||||
|
||||
LogManager.Configuration.Reload();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue