Click or drag to resize

LoggerWithProperties Method

Creates new logger that automatically appends the specified properties to all log events (without changing current logger) With Properties property, all properties can be enumerated.

Namespace:  NLog
Assembly:  NLog (in NLog.dll) Version: 6.0.0+cfb73701cda54e2410b006f649f072e90daef707
Syntax
public Logger WithProperties(
	IEnumerable<KeyValuePair<string, Object>> properties
)

Parameters

properties
Type: System.Collections.GenericIEnumerableKeyValuePairString, Object
Collection of key-value pair properties

Return Value

Type: Logger
New Logger object that automatically appends specified properties
See Also