From e1ffa26777db7dc276c0c1023c4c12e2d16f6c2c Mon Sep 17 00:00:00 2001 From: Rolf Kristensen Date: Sun, 11 Nov 2018 15:08:53 +0100 Subject: [PATCH 1/3] NLogFactory - Removed explicit loading of nlog.config by default, since NLog will automatically load its configuration --- src/Castle.Services.Logging.NLogIntegration/NLogFactory.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Castle.Services.Logging.NLogIntegration/NLogFactory.cs b/src/Castle.Services.Logging.NLogIntegration/NLogFactory.cs index 90db42ef78..6b9547d70a 100644 --- a/src/Castle.Services.Logging.NLogIntegration/NLogFactory.cs +++ b/src/Castle.Services.Logging.NLogIntegration/NLogFactory.cs @@ -32,14 +32,14 @@ public class NLogFactory : AbstractLoggerFactory /// Initializes a new instance of the class. /// public NLogFactory() - : this(defaultConfigFileName) + : this(true) { } /// /// Initializes a new instance of the class. /// - /// If true. Skips the initialization of log4net assuming it will happen externally. Useful if you're using another framework that wants to take over configuration of NLog. + /// If true. Skips the initialization of NLog assuming it will happen externally (or automatically by NLog). public NLogFactory(bool configuredExternally) { if (configuredExternally) From 8f3fb9ec1a17ae61c167ec4bad5a9c892f67d99b Mon Sep 17 00:00:00 2001 From: Rolf Kristensen Date: Mon, 12 Nov 2018 18:45:25 +0100 Subject: [PATCH 2/3] NLogFactory - Removed explicit loading of nlog.config by default (changelog) --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d9eef1e02..8752b0b6fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ Deprecations: Enhancements: - Recognize read-only parameters by the `In` modreq (@zvirja, #406) + - NLogFactory will no longer load NLog.config by default, since NLog does it automatically (@snakefoot, #419) ## 4.3.1 (2018-06-21) From 519a1fdc93176564201c49382d9db9395fe1141d Mon Sep 17 00:00:00 2001 From: Rolf Kristensen Date: Mon, 12 Nov 2018 23:54:52 +0100 Subject: [PATCH 3/3] ExtendedNLogFactory - Removed explicit loading of nlog.config by default, since NLog will automatically load its configuration --- CHANGELOG.md | 2 +- .../ExtendedNLogFactory.cs | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8752b0b6fd..ef822cedc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ Deprecations: Enhancements: - Recognize read-only parameters by the `In` modreq (@zvirja, #406) - - NLogFactory will no longer load NLog.config by default, since NLog does it automatically (@snakefoot, #419) + - NLogFactory and ExtendedNLogFactory default constructor will no longer load NLog.config, since NLog does it automatically (@snakefoot, #419) ## 4.3.1 (2018-06-21) diff --git a/src/Castle.Services.Logging.NLogIntegration/ExtendedNLogFactory.cs b/src/Castle.Services.Logging.NLogIntegration/ExtendedNLogFactory.cs index ccf202ebc0..c4a681f76c 100644 --- a/src/Castle.Services.Logging.NLogIntegration/ExtendedNLogFactory.cs +++ b/src/Castle.Services.Logging.NLogIntegration/ExtendedNLogFactory.cs @@ -28,17 +28,14 @@ public class ExtendedNLogFactory : AbstractExtendedLoggerFactory { /// /// Initializes a new instance of the class. - /// Configures NLog with a config file name 'nlog.config' - /// /// public ExtendedNLogFactory() - : this(NLogFactory.defaultConfigFileName) + : this(true) { } /// - /// Initializes a new instance of the class with the configfile specified by + /// Initializes a new instance of the class. /// /// The config file. public ExtendedNLogFactory(string configFile) @@ -50,7 +47,7 @@ public ExtendedNLogFactory(string configFile) /// /// Initializes a new instance of the class. /// - /// If true . Skips the initialization of log4net assuming it will happen externally. Useful if you're using another framework that wants to take over configuration of NLog. + /// If true. Skips the initialization of NLog assuming it will happen externally (or automatically by NLog). public ExtendedNLogFactory(bool configuredExternally) { if (configuredExternally)