Click or drag to resize

TargetRenderLogEventT Method (LayoutT, LogEventInfo, T)

Renders the logevent into a result-value by using the provided layout

Namespace:  NLog.Targets
Assembly:  NLog (in NLog.dll) Version: 5.3.4+73d83d3161d31288ca5c554cc50d27b6bed5f28b
Syntax
protected T RenderLogEvent<T>(
	Layout<T> layout,
	LogEventInfo logEvent,
	T defaultValue = null
)

Parameters

layout
Type: NLog.LayoutsLayoutT
The layout.
logEvent
Type: NLogLogEventInfo
The logevent info.
defaultValue (Optional)
Type: T
Fallback value when no value available

Type Parameters

T

Return Value

Type: T
Result value when available, else fallback to defaultValue
See Also