mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
PathProvider. visit us for all of your pathing needs.
This commit is contained in:
@@ -7,17 +7,23 @@ using NzbDrone.Core.Providers;
|
||||
|
||||
namespace NzbDrone.Core.Instrumentation
|
||||
{
|
||||
public static class LogConfiguration
|
||||
public class LogConfiguration
|
||||
{
|
||||
private readonly PathProvider _pathProvider;
|
||||
|
||||
public static void Setup()
|
||||
public LogConfiguration(PathProvider pathProvider)
|
||||
{
|
||||
_pathProvider = pathProvider;
|
||||
}
|
||||
|
||||
public void Setup()
|
||||
{
|
||||
if (Common.EnviromentProvider.IsProduction)
|
||||
{
|
||||
LogManager.ThrowExceptions = false;
|
||||
}
|
||||
|
||||
LogManager.Configuration = new XmlLoggingConfiguration(Path.Combine(new EnviromentProvider().WebRoot, "log.config"), false);
|
||||
LogManager.Configuration = new XmlLoggingConfiguration(_pathProvider.LogConfigFile, false);
|
||||
|
||||
Common.LogConfiguration.RegisterConsoleLogger(LogLevel.Info, "NzbDrone.Web.MvcApplication");
|
||||
Common.LogConfiguration.RegisterConsoleLogger(LogLevel.Info, "NzbDrone.Core.CentralDispatch");
|
||||
|
Reference in New Issue
Block a user