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

NLog.Common.LogEventInfoBuffer

public class LogEventInfoBuffer
A cyclic buffer of LogEventInfo object.
public int Size { get; }

Gets the capacity of the buffer

public LogEventInfoBuffer(int size, bool growAsNeeded, int growLimit)

Initializes a new instance of the LogEventInfoBuffer class.

public int Append(AsyncLogEventInfo eventInfo)

Adds the specified log event to the buffer.

Gets the array of events accumulated in the buffer and clears the buffer as one atomic operation.