mirror of https://github.com/Radarr/Radarr
trying to fix nlog for nzbdrone services
This commit is contained in:
parent
dfba627edc
commit
89dba91f3a
|
@ -1,4 +1,5 @@
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Web.Hosting;
|
||||||
using NLog;
|
using NLog;
|
||||||
using NzbDrone.Common;
|
using NzbDrone.Common;
|
||||||
using NzbDrone.Services.Service.App_Start;
|
using NzbDrone.Services.Service.App_Start;
|
||||||
|
@ -14,8 +15,10 @@ namespace NzbDrone.Services.Service.App_Start
|
||||||
|
|
||||||
public static void PreStart()
|
public static void PreStart()
|
||||||
{
|
{
|
||||||
|
string logPath = string.Format("C:\\NLog\\{0}\\{1}\\${{shortdate}}.log", HostingEnvironment.SiteName, new EnviromentProvider().Version);
|
||||||
|
|
||||||
LogConfiguration.RegisterUdpLogger();
|
LogConfiguration.RegisterUdpLogger();
|
||||||
LogConfiguration.RegisterFileLogger("${basedir}/_logs/${shortdate}.log", LogLevel.Trace);
|
LogConfiguration.RegisterFileLogger(logPath, LogLevel.Trace);
|
||||||
LogConfiguration.Reload();
|
LogConfiguration.Reload();
|
||||||
|
|
||||||
logger.Info("Logger has been configured. (App Start)");
|
logger.Info("Logger has been configured. (App Start)");
|
||||||
|
|
Loading…
Reference in New Issue