From 2e3650a9110bf7da350578316bf576a36b2a2229 Mon Sep 17 00:00:00 2001 From: Rolf Kristensen Date: Tue, 12 May 2020 21:21:21 +0200 Subject: [PATCH] LogFactory.Setup - Make RegisterConfigSettings public (#423) --- .../Config/SetupExtensionsBuilderExtensions.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/NLog.Extensions.Logging/Config/SetupExtensionsBuilderExtensions.cs b/src/NLog.Extensions.Logging/Config/SetupExtensionsBuilderExtensions.cs index 46056a74..f7196f35 100644 --- a/src/NLog.Extensions.Logging/Config/SetupExtensionsBuilderExtensions.cs +++ b/src/NLog.Extensions.Logging/Config/SetupExtensionsBuilderExtensions.cs @@ -9,13 +9,12 @@ namespace NLog.Extensions.Logging public static class SetupExtensionsBuilderExtensions { /// - /// Replace with version from NLog.Extension.Logging when it has been released with NLog 4.7 + /// Setup the MEL-configuration for the ${configsetting} layoutrenderer /// - internal static ISetupExtensionsBuilder RegisterConfigSettings(this ISetupExtensionsBuilder setupBuilder, IConfiguration configuration) + public static ISetupExtensionsBuilder RegisterConfigSettings(this ISetupExtensionsBuilder setupBuilder, IConfiguration configuration) { ConfigSettingLayoutRenderer.DefaultConfiguration = configuration; - ConfigurationItemFactory.Default.RegisterType(typeof(ConfigSettingLayoutRenderer), string.Empty); - return setupBuilder; + return setupBuilder.RegisterLayoutRenderer("configsetting"); } } }