Click or drag to resize

ConfigureExtensionsUseNLog Method (IHostBuilder)

Enable and configure NLog as a logging provider for buildable generic host (.NET Core 2.1+). Can be used in discrete containers as well.

Namespace:  NLog.Extensions.Hosting
Assembly:  NLog.Extensions.Hosting (in NLog.Extensions.Hosting.dll) Version: 5.0.0+ff461ffb92d00b68d0681461691f588bf9d56809
Syntax
public static IHostBuilder UseNLog(
	this IHostBuilder builder
)

Parameters

builder
Type: IHostBuilder

Return Value

Type: IHostBuilder
IHostBuilder for chaining

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IHostBuilder. 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