mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 12:32:31 +01:00
New: log all startup events to log file at trace and above
This commit is contained in:
parent
f63476260b
commit
33f44e7932
@ -94,7 +94,7 @@ private static void RegisterAppFile(IAppFolderInfo appFolderInfo)
|
|||||||
fileTarget.ArchiveNumbering = ArchiveNumberingMode.Rolling;
|
fileTarget.ArchiveNumbering = ArchiveNumberingMode.Rolling;
|
||||||
fileTarget.Layout = FILE_LOG_LAYOUT;
|
fileTarget.Layout = FILE_LOG_LAYOUT;
|
||||||
|
|
||||||
var loggingRule = new LoggingRule("*", LogLevel.Info, fileTarget);
|
var loggingRule = new LoggingRule("*", LogLevel.Trace, fileTarget);
|
||||||
|
|
||||||
LogManager.Configuration.AddTarget("appfile", fileTarget);
|
LogManager.Configuration.AddTarget("appfile", fileTarget);
|
||||||
LogManager.Configuration.LoggingRules.Add(loggingRule);
|
LogManager.Configuration.LoggingRules.Add(loggingRule);
|
||||||
|
@ -10,7 +10,8 @@
|
|||||||
|
|
||||||
namespace NzbDrone.Core.Instrumentation
|
namespace NzbDrone.Core.Instrumentation
|
||||||
{
|
{
|
||||||
public class ReconfigureLogging : IHandleAsync<ConfigFileSavedEvent>, IHandleAsync<ApplicationStartedEvent>
|
public class ReconfigureLogging : IHandleAsync<ConfigFileSavedEvent>,
|
||||||
|
IHandle<ApplicationStartedEvent>
|
||||||
{
|
{
|
||||||
private readonly IConfigFileProvider _configFileProvider;
|
private readonly IConfigFileProvider _configFileProvider;
|
||||||
|
|
||||||
@ -84,7 +85,7 @@ public void HandleAsync(ConfigFileSavedEvent message)
|
|||||||
Reconfigure();
|
Reconfigure();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HandleAsync(ApplicationStartedEvent message)
|
public void Handle(ApplicationStartedEvent message)
|
||||||
{
|
{
|
||||||
Reconfigure();
|
Reconfigure();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user