| AspNetExtensionsUseNLog Method (IWebHostBuilder, NLogAspNetCoreOptions) |
Enable NLog as logging provider for Microsoft Extension Logging.
Namespace:
NLog.Web
Assembly:
NLog.Web.AspNetCore (in NLog.Web.AspNetCore.dll) Version: 5.3.13+628b0876960af3ee3454c99b7985dbb5e1c46bf0
Syntax public static IWebHostBuilder UseNLog(
this IWebHostBuilder builder,
NLogAspNetCoreOptions options
)
<ExtensionAttribute>
Public Shared Function UseNLog (
builder As IWebHostBuilder,
options As NLogAspNetCoreOptions
) As IWebHostBuilder
Dim builder As IWebHostBuilder
Dim options As NLogAspNetCoreOptions
Dim returnValue As IWebHostBuilder
returnValue = builder.UseNLog(options)
[<ExtensionAttribute>]
static member UseNLog :
builder : IWebHostBuilder *
options : NLogAspNetCoreOptions -> IWebHostBuilder
Parameters
- builder
- Type: IWebHostBuilder
- options
- Type: NLog.WebNLogAspNetCoreOptions
Options for registration of the NLog LoggingProvider and enabling features.
Return Value
Type:
IWebHostBuilderUsage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IWebHostBuilder. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also