Variable FiltersConst

Filters: {
    AND: ((filters, id?) => Filter);
    CATEGORY_EQUALS: ((category, id?) => Filter);
    CATEGORY_INCLUDES: ((category, id?) => Filter);
    DEFAULT: ((id?) => Filter);
    NOT: ((filter, id?) => Filter);
    OR: ((filters, id?) => Filter);
    REF_MATCHES: ((pattern, id?) => Filter);
    SEVERITY_BELOW: ((level, id?) => Filter);
    SEVERITY_EQUALS: ((level, id?) => Filter);
    SEVERITY_MIN: ((level, id?) => Filter);
} = ...

Type declaration

  • AND: ((filters, id?) => Filter)

    Creates an and filter. The and filter evaluates to true, if all of its sub-filters evaluate to true.

    Returns

    true, if all specified sub filters match for the tested message.

  • CATEGORY_EQUALS: ((category, id?) => Filter)

    Creates a category equals filter. The category equals filter checks if the message's category is exactly the same as the specified category.

    Returns

    true, if the category of the message equals to the category specified

      • (category, id?): Filter
      • Parameters

        • category: null | string | Category

          The category to check against.

        • Optional id: string

          An identifier of the created filter in order to match errors.

        Returns Filter

  • CATEGORY_INCLUDES: ((category, id?) => Filter)

    Creates a category includes filter. The category includes filter checks if the message's category is either the same as the specified category or one of its sub categories.

    Returns

    true, if the category specified contains the category of the message or is equal to it

      • (category, id?): Filter
      • Parameters

        • category: null | string | Category

          The category to check against.

        • Optional id: string

          An identifier of the created filter in order to match errors.

        Returns Filter

  • DEFAULT: ((id?) => Filter)

    Creates a default filter. The default filter always evaluates to true.

    Returns

    true, always

      • (id?): Filter
      • Parameters

        • Optional id: string

          An identifier of the created filter in order to match errors.

        Returns Filter

  • NOT: ((filter, id?) => Filter)

    Creates a not filter. The not filter inverts the filter result of its sub-filter.

    Returns

    negates the result of the filter function specified.

      • (filter, id?): Filter
      • Parameters

        • filter: FilterFn | Filter

          The sub filter.

        • Optional id: string

          An identifier of the created filter in order to match errors.

        Returns Filter

  • OR: ((filters, id?) => Filter)

    Creates an or filter. The or filter evaluates to true, if at least one of its sub-filters evaluates to true.

    Returns

    true, if at least one of the specified sub filters match for the tested message.

  • REF_MATCHES: ((pattern, id?) => Filter)

    Creates a ref matches filter. The ref matches filter checks if the message's ref matches the specified filter. The filter can be a regular expression or a wild card pattern using the Asterisk (*) once, e.g. 'module:*:class'.

    Returns

    true, if the message's ref property matches the pattern specified.

      • (pattern, id?): Filter
      • Parameters

        • pattern: string | RegExp

          The pattern to match the message ref against. If no regular expression is provided, one asterisk is allowed to match the message's ref against.

        • Optional id: string

          An identifier of the created filter in order to match errors.

        Returns Filter

  • SEVERITY_BELOW: ((level, id?) => Filter)

    Creates a severity below filter. The severity below filter checks if the log message severity is lower than the specified severity.

    Returns

    true, if the message's severity is lower than the severity specified.

      • (level, id?): Filter
      • Parameters

        • level: string | number

          The severity level to check for.

        • Optional id: string

          An identifier of the created filter in order to match errors.

        Returns Filter

  • SEVERITY_EQUALS: ((level, id?) => Filter)

    Creates a severity equals filter. The severity equals filter checks if the log message severity equals the specified severity.

    Returns

    true, if the message's severity equals the severity level specified.

      • (level, id?): Filter
      • Parameters

        • level: string | number

          The severity level to check for.

        • Optional id: string

          An identifier of the created filter in order to match errors.

        Returns Filter

  • SEVERITY_MIN: ((level, id?) => Filter)

    Creates a severity minimum filter. The severity minimum filter checks if the log message severity is higher or equal than the specified severity.

    Returns

    true, if the message's severity is greater or equal the severity level specified.

      • (level, id?): Filter
      • Parameters

        • level: string | number

          The severity level to check for.

        • Optional id: string

          An identifier of the created filter in order to match errors.

        Returns Filter