| 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
)
Protected Function RenderLogEvent(Of T) (
layout As Layout(Of T),
logEvent As LogEventInfo,
Optional defaultValue As T = Nothing
) As T
Dim layout As Layout(Of T)
Dim logEvent As LogEventInfo
Dim defaultValue As T
Dim returnValue As T
returnValue = Me.RenderLogEvent(layout,
logEvent, defaultValue)
member RenderLogEvent :
layout : Layout<'T> *
logEvent : LogEventInfo *
?defaultValue : 'T
(* Defaults:
let _defaultValue = defaultArg defaultValue null
*)
-> 'T
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:
TResult value when available, else fallback to defaultValue
See Also