1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-16 07:52:36 +01:00
Radarr/NzbDrone.Web/App_Start/Logging.cs
2013-02-15 16:52:09 -08:00

26 lines
889 B
C#

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();
//LogManager.Configuration = new XmlLoggingConfiguration(environmentProvider.GetNlogConfigPath(), false);
LogConfiguration.RegisterUdpLogger();
LogConfiguration.RegisterRemote();
LogConfiguration.RegisterConsoleLogger(LogLevel.Info, "NzbDrone.Web.MvcApplication");
LogConfiguration.RegisterConsoleLogger(LogLevel.Info, "NzbDrone.Core.CentralDispatch");
LogConfiguration.RegisterRollingFileLogger(environmentProvider.GetLogFileName(), LogLevel.Trace);
}
}
}