| AspNetExtensionsConfigureNLog Method (ILoggingBuilder, LoggingConfiguration) |
Note: This API is now obsolete.
Namespace:
NLog.Web
Assembly:
NLog.Web.AspNetCore (in NLog.Web.AspNetCore.dll) Version: 5.3.13+628b0876960af3ee3454c99b7985dbb5e1c46bf0
Syntax [ObsoleteAttribute("Use UseNLog() on IHostBuilder / IWebHostBuilder, or AddNLogWeb() on ILoggingBuilder")]
public static LogFactory ConfigureNLog(
this ILoggingBuilder builder,
LoggingConfiguration configuration
)
<ExtensionAttribute>
<ObsoleteAttribute("Use UseNLog() on IHostBuilder / IWebHostBuilder, or AddNLogWeb() on ILoggingBuilder")>
Public Shared Function ConfigureNLog (
builder As ILoggingBuilder,
configuration As LoggingConfiguration
) As LogFactory
Dim builder As ILoggingBuilder
Dim configuration As LoggingConfiguration
Dim returnValue As LogFactory
returnValue = builder.ConfigureNLog(configuration)
[<ExtensionAttribute>]
[<ObsoleteAttribute("Use UseNLog() on IHostBuilder / IWebHostBuilder, or AddNLogWeb() on ILoggingBuilder")>]
static member ConfigureNLog :
builder : ILoggingBuilder *
configuration : LoggingConfiguration -> LogFactory
Parameters
- builder
- Type: ILoggingBuilder
The logging builder - configuration
- Type: NLog.ConfigLoggingConfiguration
Config for NLog
Return Value
Type:
LogFactoryLogFactory to get loggers, add events etc
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
ILoggingBuilder. 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