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: 5.3.4+73d83d3161d31288ca5c554cc50d27b6bed5f28b
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