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.1+cf6675da40ccfd4c8c526a3b2bdbeed3442910a1
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