| TargetWithContextGenerateUniqueItemName Method |
Generates a new unique name, when duplicate names are detected
Namespace:
NLog.Targets
Assembly:
NLog (in NLog.dll) Version: 5.3.4+73d83d3161d31288ca5c554cc50d27b6bed5f28b
Syntax protected virtual string GenerateUniqueItemName(
LogEventInfo logEvent,
string itemName,
Object itemValue,
IDictionary<string, Object> combinedProperties
)
Protected Overridable Function GenerateUniqueItemName (
logEvent As LogEventInfo,
itemName As String,
itemValue As Object,
combinedProperties As IDictionary(Of String, Object)
) As String
Dim logEvent As LogEventInfo
Dim itemName As String
Dim itemValue As Object
Dim combinedProperties As IDictionary(Of String, Object)
Dim returnValue As String
returnValue = Me.GenerateUniqueItemName(logEvent,
itemName, itemValue, combinedProperties)
abstract GenerateUniqueItemName :
logEvent : LogEventInfo *
itemName : string *
itemValue : Object *
combinedProperties : IDictionary<string, Object> -> string
override GenerateUniqueItemName :
logEvent : LogEventInfo *
itemName : string *
itemValue : Object *
combinedProperties : IDictionary<string, Object> -> string
Parameters
- logEvent
- Type: NLogLogEventInfo
LogEvent that triggered the duplicate name - itemName
- Type: SystemString
Duplicate item name - itemValue
- Type: SystemObject
Item Value - combinedProperties
- Type: System.Collections.GenericIDictionaryString, Object
Dictionary of context values
Return Value
Type:
StringNew (unique) value (or null to skip value). If the same value is used then the item will be overwritten
See Also