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

NLog.Targets.NullTarget

public sealed class NullTarget : TargetWithLayout
Discards log messages. Used mainly for debugging and benchmarking.
public bool FormatMessage { get; set; }

Gets or sets a value indicating whether to render Layout for LogEvent

public LogEventInfo LastLogEvent { get; }

Gets the last LogEvent rendered by this target.

public string LastMessage { get; }

Gets the last message rendered by this target.

public int LogEventCounter { get; }

Gets the number of times this target has been called.

public NullTarget()

Initializes a new instance of the NullTarget class.

public NullTarget(string name)

Initializes a new instance of the NullTarget class.