Click or drag to resize

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
)

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: String
New (unique) value (or null to skip value). If the same value is used then the item will be overwritten
See Also