You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Readarr/NzbDrone.Web/App_Start/Logging.cs

26 lines
889 B

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);
}
}
}