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

NLog.Targets.Wrappers.AutoFlushTargetWrapper

Causes a flush on a wrapped target if LogEvent satisfies the Condition. If condition isn't set, flushes on each write.
public bool AsyncFlush { get; set; }

Delay the flush until the LogEvent has been confirmed as written

public ConditionExpression Condition { get; set; }

Gets or sets the condition expression. Log events who meet this condition will cause a flush on the wrapped target.

public bool FlushOnConditionOnly { get; set; }

Only flush when LogEvent matches condition. Ignore explicit-flush, config-reload-flush and shutdown-flush

Initializes a new instance of the AutoFlushTargetWrapper class.

public AutoFlushTargetWrapper(string name, Target wrappedTarget)

Initializes a new instance of the AutoFlushTargetWrapper class.

public AutoFlushTargetWrapper(Target wrappedTarget)

Initializes a new instance of the AutoFlushTargetWrapper class.