1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-25 01:11:43 +00:00

trying to fix nlog for nzbdrone services

This commit is contained in:
kay.one 2012-02-15 21:14:01 -08:00
parent dfba627edc
commit 89dba91f3a

View file

@ -1,4 +1,5 @@
using System.Linq;
using System.Web.Hosting;
using NLog;
using NzbDrone.Common;
using NzbDrone.Services.Service.App_Start;
@ -14,13 +15,15 @@ public static class Logging
public static void PreStart()
{
string logPath = string.Format("C:\\NLog\\{0}\\{1}\\${{shortdate}}.log", HostingEnvironment.SiteName, new EnviromentProvider().Version);
LogConfiguration.RegisterUdpLogger();
LogConfiguration.RegisterFileLogger("${basedir}/_logs/${shortdate}.log", LogLevel.Trace);
LogConfiguration.RegisterFileLogger(logPath, LogLevel.Trace);
LogConfiguration.Reload();
logger.Info("Logger has been configured. (App Start)");
}
}
}