| LayoutFromMethod Method |
Namespace:
NLog.Layouts
Assembly:
NLog (in NLog.dll) Version: 5.3.4+73d83d3161d31288ca5c554cc50d27b6bed5f28b
Syntax public static Layout FromMethod(
Func<LogEventInfo, Object> layoutMethod,
LayoutRenderOptions options = LayoutRenderOptions.None
)
Public Shared Function FromMethod (
layoutMethod As Func(Of LogEventInfo, Object),
Optional options As LayoutRenderOptions = LayoutRenderOptions.None
) As Layout
Dim layoutMethod As Func(Of LogEventInfo, Object)
Dim options As LayoutRenderOptions
Dim returnValue As Layout
returnValue = Layout.FromMethod(layoutMethod,
options)
static member FromMethod :
layoutMethod : Func<LogEventInfo, Object> *
?options : LayoutRenderOptions
(* Defaults:
let _options = defaultArg options LayoutRenderOptions.None
*)
-> Layout
Parameters
- layoutMethod
- Type: SystemFuncLogEventInfo, Object
Method that renders the layout. - options (Optional)
- Type: NLog.LayoutsLayoutRenderOptions
Whether method is ThreadAgnostic and doesn't depend on context of the logging application thread.
Return Value
Type:
LayoutInstance of
SimpleLayout.
See Also