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

NLog.Targets.ConsoleRowHighlightingRule

The row-highlighting condition.
public static ConsoleRowHighlightingRule Default { get; }

Gets the default highlighting rule. Doesn't change the color.

public ConsoleOutputColor BackgroundColor { get; set; }

Gets or sets the background color.

public ConditionExpression Condition { get; set; }

Gets or sets the condition that must be met in order to set the specified foreground and background color.

public ConsoleOutputColor ForegroundColor { get; set; }

Gets or sets the foreground color.

Initializes a new instance of the ConsoleRowHighlightingRule class.

public ConsoleRowHighlightingRule(ConditionExpression condition, ConsoleOutputColor foregroundColor, ConsoleOutputColor backgroundColor)

Initializes a new instance of the ConsoleRowHighlightingRule class.

public bool CheckCondition(LogEventInfo logEvent)

Checks whether the specified log event matches the condition (if any).