Class LogEventGuard

Base class for other constructs that need to filter log events.

Sub-classes of this will use the test delegate to determine if log events are considered valid and/or acceptable.

Hierarchy

Constructors

Properties

test: LogEventFilterPredicate = LogEventGuard.FILTER_ACCEPT_ALL

Predicate that will be used for log event validation.

FILTER_ACCEPT_ALL: LogEventFilterPredicate = ...
FILTER_BLOCK_ALL: LogEventFilterPredicate = ...

Methods

  • Reject all tested events.

    Mutually exclusive operation to setCustomFilter; if a custom filter was set before calling this, it will be cleared.

    Returns

    this for operation chaining.

    Returns LogEventGuard

  • Accept all tested events.

    Mutually exclusive operation to setCustomFilter; if a custom filter was set before calling this, it will be cleared.

    Returns

    this for operation chaining.

    Returns LogEventGuard

  • Convenience for setting enabled state based on a flag.

    Mutually exclusive operation to setCustomFilter; if a custom filter was set before calling this, it will be cleared.

    Returns

    this for operation chaining.

    Parameters

    • enabled: boolean

      the filter state to use, e.g. true to accept all events, or false to reject all events.

    Returns LogEventGuard

Generated using TypeDoc