Skip to content

Commit

Permalink
LogFactory.Setup - Make RegisterConfigSettings public (#423)
Browse files Browse the repository at this point in the history
  • Loading branch information
snakefoot authored May 12, 2020
1 parent d49fdab commit 2e3650a
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ namespace NLog.Extensions.Logging
public static class SetupExtensionsBuilderExtensions
{
/// <summary>
/// Replace with version from NLog.Extension.Logging when it has been released with NLog 4.7
/// Setup the MEL-configuration for the ${configsetting} layoutrenderer
/// </summary>
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<ConfigSettingLayoutRenderer>("configsetting");
}
}
}

0 comments on commit 2e3650a

Please sign in to comment.