mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
Enabled rolling file logging.
This commit is contained in:
parent
5e3e071692
commit
d1e3298da1
17 changed files with 817 additions and 185 deletions
|
@ -1,4 +1,5 @@
|
|||
using NLog;
|
||||
using System.IO;
|
||||
using NLog;
|
||||
using Ninject;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Providers;
|
||||
|
@ -43,12 +44,14 @@ namespace NzbDrone
|
|||
|
||||
private static void InitilizeApp()
|
||||
{
|
||||
LogConfiguration.RegisterFileLogger("nzbdrone.log");
|
||||
var enviromentProvider = _kernel.Get<EnviromentProvider>();
|
||||
|
||||
LogConfiguration.RegisterRollingFileLogger(enviromentProvider.GetLogFileName(), LogLevel.Info);
|
||||
LogConfiguration.RegisterConsoleLogger(LogLevel.Debug);
|
||||
LogConfiguration.RegisterUdpLogger();
|
||||
LogConfiguration.RegisterExceptioneer();
|
||||
LogConfiguration.Reload();
|
||||
Logger.Info("Start-up Path:'{0}'", _kernel.Get<EnviromentProvider>().ApplicationPath);
|
||||
Logger.Info("Start-up Path:'{0}'", enviromentProvider.ApplicationPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue