Philipp Knobel created LOG4J2-1154: -------------------------------------- Summary: Javadoc for AbstractFilter wrong? Key: LOG4J2-1154 URL: https://issues.apache.org/jira/browse/LOG4J2-1154 Project: Log4j 2 Issue Type: Documentation Components: Filters Affects Versions: 2.4 Reporter: Philipp Knobel
The class org.apache.logging.log4j.core.Filter has as javadoc for the filter methods just the description: *Filter an event.* The org.apache.logging.log4j.core.filter.AbstractFilter has as description for three of the filter methods: * Appender Filter method. The default returns NEUTRAL.* could you clarify when each of these will be called? And the last one *filter(LogEvent)* has as decription *Context Filter method. The default returns NEUTRAL.* But this method isn't called, when I configure the filter as context filter. My config looks like: {code} <configuration name="test" packages="my.package"> <MyFilter/> <Appenders> <Console name="Console" target="SYSTEM_OUT"> <PatternLayout pattern="m%n" charset="UTF-8"/> </Console> </Appenders> <Loggers> <root level="DEBUG"> <AppenderRef ref="Console"/> </root> </Loggers> </configuration> {code} And btw., do I understand it correctly that each logger calls all Context Filter as well? So that the only benefit of a context filter is that it's shared acrossed Logger, but not actually allowing reducing the invocation count of the filter as if it was defined for each Logger? -- 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