Click or drag to resize

LoggerWithProperty Method

Creates new logger that automatically appends the specified property 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 WithProperty(
	string propertyKey,
	Object propertyValue
)

Parameters

propertyKey
Type: SystemString
Property Name
propertyValue
Type: SystemObject
Property Value

Return Value

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