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

NLog.Targets.MemoryTarget

Writes log messages to Logs in memory for programmatic retrieval.
public IList<string> Logs { get; }

Gets the list of logs gathered in the MemoryTarget.

public int MaxLogsCount { get; set; }

Gets or sets the max number of items to have in memory. Zero or Negative means no limit.

public MemoryTarget()

Initializes a new instance of the MemoryTarget class.

public MemoryTarget(string name)

Initializes a new instance of the MemoryTarget class.