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.5.0+1873145cbc26e0312d9481234d69ce7dc68aac4e
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