Skip to content

CompositeFilter doesn't work with multiple MarkerFilters #3104

@mgaceanu

Description

@mgaceanu

Description

The composite filter seem to not work with multiple MarkerFilters.
I learned in the meantime about the existence of the NoMarkerFilter which fits my use case, but I guess chaining multiple MarkerFilters is still a valid scenario.

Here is my configuration:

      AppenderRef:
        - ref: Console
          Filters:
            - MarkerFilter:
                marker: COMMAND
                onMatch: DENY
                onMismatch: NEUTRAL
            - MarkerFilter:
                marker: METRICS
                onMatch: DENY
                onMismatch: NEUTRAL

You can see in the logs bellow, having two MarkerFIlters, COMMAND and METRICS, only the first one is taken into account.

Configuration

Version: 2.24.1

Operating system: Ubuntu 22.04

JDK: 8

Logs

2024-10-17T12:26:13,119 [main] INFO  MarkerExample - This is a METRICS log entry
2024-10-17T12:26:13,122 [main] INFO  MarkerExample - This is a general log entry without a marker

Reproduction

I'm attaching a test below
demo.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions