1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-16 16:04:08 +01:00
Radarr/NzbDrone.Web/App_Start/Logging.cs

26 lines
889 B
C#
Raw Normal View History

2012-01-23 03:24:16 +01:00
using System.Linq;
using NLog;
using NzbDrone.Common;
[assembly: WebActivator.PreApplicationStartMethod(typeof(NzbDrone.Web.App_Start.Logging), "PreStart")]
namespace NzbDrone.Web.App_Start
{
public static class Logging
{
public static void PreStart()
{
var environmentProvider = new EnvironmentProvider();
2012-01-23 03:24:16 +01:00
2013-01-20 02:00:20 +01:00
//LogManager.Configuration = new XmlLoggingConfiguration(environmentProvider.GetNlogConfigPath(), false);
2012-01-23 03:24:16 +01:00
LogConfiguration.RegisterUdpLogger();
LogConfiguration.RegisterRemote();
2012-01-23 03:24:16 +01:00
LogConfiguration.RegisterConsoleLogger(LogLevel.Info, "NzbDrone.Web.MvcApplication");
LogConfiguration.RegisterConsoleLogger(LogLevel.Info, "NzbDrone.Core.CentralDispatch");
LogConfiguration.RegisterRollingFileLogger(environmentProvider.GetLogFileName(), LogLevel.Trace);
2012-01-23 03:24:16 +01:00
}
}
}