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

NLog.LayoutRenderers.MessageLayoutRenderer

The formatted log message.
public string ExceptionSeparator { get; set; }

Gets or sets the string that separates message from the exception.

public bool Raw { get; set; }

Gets or sets whether it should render the raw message without formatting parameters

public bool WithException { get; set; }

Gets or sets a value indicating whether to log exception along with message.