Click or drag to resize

AspNetExtensionsAddNLogWeb Method (ILoggingBuilder, String)

Enable NLog as logging provider for Microsoft Extension Logging, and explicit load NLog.config from path

Namespace:  NLog.Web
Assembly:  NLog.Web.AspNetCore (in NLog.Web.AspNetCore.dll) Version: 5.3.13+628b0876960af3ee3454c99b7985dbb5e1c46bf0
Syntax
public static ILoggingBuilder AddNLogWeb(
	this ILoggingBuilder builder,
	string configFileName
)

Parameters

builder
Type: ILoggingBuilder
The logging builder
configFileName
Type: SystemString
Path to NLog configuration file, e.g. nlog.config.

Return Value

Type: ILoggingBuilder

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