Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed obsolete-attribute from ConfigureNLog-methods for ILoggingBuilder #482

Merged
merged 1 commit into from
Sep 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/NLog.Web.AspNetCore/AspNetExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,9 @@ public static IServiceProvider SetupNLogServiceLocator(this IServiceProvider ser
/// <param name="configFileName">Path to NLog configuration file, e.g. nlog.config. </param>
/// >
/// <returns>LogFactory to get loggers, add events etc</returns>
[Obsolete("Use UseNLog() on IWebHostBuilder, and NLog.Web.NLogBuilder.ConfigureNLog()")]
public static LogFactory ConfigureNLog(this ILoggingBuilder builder, string configFileName)
{
ConfigurationItemFactory.Default.RegisterItemsFromAssembly(typeof(AspNetExtensions).GetTypeInfo().Assembly);
builder.AddNLog();
ConfigureServicesNLog(null, builder.Services, serviceProvider => serviceProvider.GetService<IConfiguration>());
return LogManager.LoadConfiguration(configFileName);
}

Expand All @@ -96,11 +94,9 @@ public static LogFactory ConfigureNLog(this ILoggingBuilder builder, string conf
/// <param name="builder">The logging builder</param>
/// <param name="configuration">Config for NLog</param>
/// <returns>LogFactory to get loggers, add events etc</returns>
[Obsolete("Use UseNLog() on IWebHostBuilder, and NLog.Web.NLogBuilder.ConfigureNLog()")]
public static LogFactory ConfigureNLog(this ILoggingBuilder builder, LoggingConfiguration configuration)
{
ConfigurationItemFactory.Default.RegisterItemsFromAssembly(typeof(AspNetExtensions).GetTypeInfo().Assembly);
builder.AddNLog();
ConfigureServicesNLog(null, builder.Services, serviceProvider => serviceProvider.GetService<IConfiguration>());
LogManager.Configuration = configuration;
return LogManager.LogFactory;
}
Expand Down