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.3.4+73d83d3161d31288ca5c554cc50d27b6bed5f28b
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