<PackageReference Include="NLog" Version="6.1.2" />

NLog.LayoutRenderers.FuncLayoutRenderer

A layout renderer which could have different behavior per instance by using a Func<T>.
public CultureInfo Culture { get; set; }

Gets or sets the culture used for rendering.

public string Format { get; set; }

Format string for conversion from object to string.

public string LayoutRendererName { get; }

Name used in config without ${}. E.g. "test" could be used as "${test}".

Method that renders the layout.

protected FuncLayoutRenderer(string layoutRendererName)

Initializes a new instance of the FuncLayoutRenderer class.

public FuncLayoutRenderer(string layoutRendererName, Func<LogEventInfo, LoggingConfiguration, object> renderMethod)

Initializes a new instance of the FuncLayoutRenderer class.

protected virtual object RenderValue(LogEventInfo logEvent)

Render the value for this log event