forked from NLog/NLog.Extensions.Logging
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reverted NLog#410 and instead introduced LoadNLogConfigFromSection on…
… ISetupBuilder
- Loading branch information
Showing
4 changed files
with
29 additions
and
56 deletions.
There are no files selected for viewing
13 changes: 0 additions & 13 deletions
13
src/NLog.Extensions.Logging/Config/ISetupLoggerProviderBuilder.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/NLog.Extensions.Logging/Config/SetupExtensionsBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using Microsoft.Extensions.Configuration; | ||
using NLog.Config; | ||
|
||
namespace NLog.Extensions.Logging | ||
{ | ||
/// <summary> | ||
/// Extension methods to setup NLog extensions, so they are known when loading NLog LoggingConfiguration | ||
/// </summary> | ||
public static class SetupExtensionsBuilderExtensions | ||
{ | ||
/// <summary> | ||
/// Replace with version from NLog.Extension.Logging when it has been released with NLog 4.7 | ||
/// </summary> | ||
internal static ISetupExtensionsBuilder RegisterConfigSettings(this ISetupExtensionsBuilder setupBuilder, IConfiguration configuration) | ||
{ | ||
ConfigSettingLayoutRenderer.DefaultConfiguration = configuration; | ||
ConfigurationItemFactory.Default.RegisterType(typeof(ConfigSettingLayoutRenderer), string.Empty); | ||
return setupBuilder; | ||
} | ||
} | ||
} |
30 changes: 0 additions & 30 deletions
30
src/NLog.Extensions.Logging/Config/SetupLoggerProviderBuilderExtensions.cs
This file was deleted.
Oops, something went wrong.