| 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
)
Public Function WithProperty (
propertyKey As String,
propertyValue As Object
) As Logger
Dim instance As Logger
Dim propertyKey As String
Dim propertyValue As Object
Dim returnValue As Logger
returnValue = instance.WithProperty(propertyKey,
propertyValue)
member WithProperty :
propertyKey : string *
propertyValue : Object -> Logger
Parameters
- propertyKey
- Type: SystemString
Property Name - propertyValue
- Type: SystemObject
Property Value
Return Value
Type:
LoggerNew Logger object that automatically appends specified property
See Also