mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
PathProvider. visit us for all of your pathing needs.
This commit is contained in:
parent
c503b497ed
commit
633f0b6197
24 changed files with 315 additions and 188 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue