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

NLog.LayoutRenderers.StackTraceLayoutRenderer

Stack trace renderer.
public bool CaptureStackTrace { get; set; }

Logger should capture StackTrace, if it was not provided manually

public StackTraceFormat Format { get; set; }

Gets or sets the output format of the stack trace.

public bool Reverse { get; set; }

Gets or sets whether to render StackFrames in reverse order

public string Separator { get; set; }

Gets or sets the stack frame separator string.

public int SkipFrames { get; set; }

Gets or sets the number of frames to skip.

public int TopFrames { get; set; }

Gets or sets the number of top stack frames to be rendered.