[ https://issues.apache.org/jira/browse/LOG4J2-997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15313722#comment-15313722 ]
Ralph Goers commented on LOG4J2-997: ------------------------------------ I am finally reviewing the patch. I'm not OK with it. I do not like 1) This patch goes way beyond what the problem statement is (not being able to remove a filter, 2) a Filterable always has a CompositeFilter, and 3) adding 2 composite filters actually results in 2 composite filters. The way filtering is supposed to work is that you either have no filters, a filter, or a single composite filter containing multiple individual filters. While you can add a composite to a composite or two composites to AbstractFilterable programmatically, it is impossible to do from configuration. I will modify CompositeFilter so that if another CompositeFilter is being added all the individual filters will be added so there will still only be one CompositeFilter. The basic root of the problem was that addFilter and removeFilter were testing the passed in filter to see if it is a CompositeFilter when it should have been checking this.filter. > removeFilter() in AbstractFilterable does not remove filter > ----------------------------------------------------------- > > Key: LOG4J2-997 > URL: https://issues.apache.org/jira/browse/LOG4J2-997 > Project: Log4j 2 > Issue Type: Bug > Components: Core > Affects Versions: 2.2 > Reporter: Maytee Chinavanichkit > Assignee: Ralph Goers > > Add two filters to a class that implements AbstractFilterable. Try to remove > one of the two filters; nothing is removed. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org