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: 6.0.0+cfb73701cda54e2410b006f649f072e90daef707
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