| 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
)
Public Function WithProperties (
properties As IEnumerable(Of KeyValuePair(Of String, Object))
) As Logger
Dim instance As Logger
Dim properties As IEnumerable(Of KeyValuePair(Of String, Object))
Dim returnValue As Logger
returnValue = instance.WithProperties(properties)
member WithProperties :
properties : IEnumerable<KeyValuePair<string, Object>> -> Logger
Parameters
- properties
- Type: System.Collections.GenericIEnumerableKeyValuePairString, Object
Collection of key-value pair properties
Return Value
Type:
LoggerNew Logger object that automatically appends specified properties
See Also