 | LayoutFromString Method (String, Boolean) |
Parses the specified string as LayoutRenderer-expression into a
SimpleLayout.
Namespace:
NLog.Layouts
Assembly:
NLog (in NLog.dll) Version: 6.0.0+cfb73701cda54e2410b006f649f072e90daef707
Syntaxpublic static Layout FromString(
string layoutText,
bool throwConfigExceptions
)
Public Shared Function FromString (
layoutText As String,
throwConfigExceptions As Boolean
) As Layout
Dim layoutText As String
Dim throwConfigExceptions As Boolean
Dim returnValue As Layout
returnValue = Layout.FromString(layoutText,
throwConfigExceptions)
static member FromString :
layoutText : string *
throwConfigExceptions : bool -> Layout
Parameters
- layoutText
- Type: SystemString
The layout string. - throwConfigExceptions
- Type: SystemBoolean
Whether NLogConfigurationException should be thrown on parse errors ( = replace unrecognized tokens with a space).
Return Value
Type:
LayoutInstance of
SimpleLayout.
See Also