Merge branch 'rel/2.0.0-preview1' into dev
This commit is contained in:
commit
a1b729184c
|
|
@ -29,13 +29,6 @@ namespace Microsoft.AspNetCore.Hosting
|
|||
/// </remarks>
|
||||
IWebHostBuilder ConfigureAppConfiguration(Action<WebHostBuilderContext, IConfigurationBuilder> configureDelegate);
|
||||
|
||||
/// <summary>
|
||||
/// Adds a delegate for configuring the provided <see cref="ILoggerFactory"/>. This may be called multiple times.
|
||||
/// </summary>
|
||||
/// <param name="configureLogging">The delegate that configures the <see cref="ILoggerFactory"/>.</param>
|
||||
/// <returns>The <see cref="IWebHostBuilder"/>.</returns>
|
||||
IWebHostBuilder ConfigureLogging(Action<ILoggerFactory> configureLogging);
|
||||
|
||||
/// <summary>
|
||||
/// Adds a delegate for configuring the provided <see cref="ILoggerFactory"/>. This may be called multiple times.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -33,5 +33,10 @@
|
|||
"TypeId": "public interface Microsoft.AspNetCore.Hosting.IWebHost : System.IDisposable",
|
||||
"MemberId": "System.Threading.Tasks.Task StopAsync(System.Threading.CancellationToken cancellationToken)",
|
||||
"Kind": "Addition"
|
||||
},
|
||||
{
|
||||
"TypeId": "public interface Microsoft.AspNetCore.Hosting.IWebHostBuilder",
|
||||
"MemberId": "Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureLogging(System.Action<Microsoft.Extensions.Logging.ILoggerFactory> configureLogging)",
|
||||
"Kind": "Removal"
|
||||
}
|
||||
]
|
||||
|
|
@ -157,22 +157,6 @@ namespace Microsoft.AspNetCore.Hosting
|
|||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a delegate for configuring the provided <see cref="ILoggerFactory"/>. This may be called multiple times.
|
||||
/// </summary>
|
||||
/// <param name="configureLogging">The delegate that configures the <see cref="ILoggerFactory"/>.</param>
|
||||
/// <returns>The <see cref="IWebHostBuilder"/>.</returns>
|
||||
public IWebHostBuilder ConfigureLogging(Action<ILoggerFactory> configureLogging)
|
||||
{
|
||||
if (configureLogging == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(configureLogging));
|
||||
}
|
||||
|
||||
_configureLoggingDelegates.Add((_, factory) => configureLogging(factory));
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a delegate for configuring the provided <see cref="ILoggerFactory"/>. This may be called multiple times.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -107,6 +107,17 @@ namespace Microsoft.AspNetCore.Hosting
|
|||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a delegate for configuring the provided <see cref="ILoggerFactory"/>. This may be called multiple times.
|
||||
/// </summary>
|
||||
/// <param name="hostBuilder">The <see cref="IWebHostBuilder" /> to configure.</param>
|
||||
/// <param name="configureLogging">The delegate that configures the <see cref="ILoggerFactory"/>.</param>
|
||||
/// <returns>The <see cref="IWebHostBuilder"/>.</returns>
|
||||
public static IWebHostBuilder ConfigureLogging(this IWebHostBuilder hostBuilder, Action<LoggerFactory> configureLogging)
|
||||
{
|
||||
return hostBuilder.ConfigureLogging<LoggerFactory>((_, loggerFactory) => configureLogging(loggerFactory));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a delegate for configuring the provided <see cref="ILoggerFactory"/>. This may be called multiple times.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue