[
https://issues.apache.org/jira/browse/LOG4J2-2882?focusedWorklogId=453902&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-453902
]
ASF GitHub Bot logged work on LOG4J2-2882:
------------------------------------------
Author: ASF GitHub Bot
Created on: 02/Jul/20 11:33
Start Date: 02/Jul/20 11:33
Worklog Time Spent: 10m
Work Description: ebourg opened a new pull request #381:
URL: https://github.com/apache/logging-log4j2/pull/381
This implements basic support for JUL filters as described in
[LOG4J2-2882](https://issues.apache.org/jira/browse/LOG4J2-2882). The log calls
are delegated to the super class only when a filter is configured, I hope this
preserves the performance in the general case. I left out the tracing methods
because I wasn't sure delegating to the super class would generate a message
with the right semantic.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 453902)
Remaining Estimate: 0h
Time Spent: 10m
> JUL adapter ignores log filters
> -------------------------------
>
> Key: LOG4J2-2882
> URL: https://issues.apache.org/jira/browse/LOG4J2-2882
> Project: Log4j 2
> Issue Type: Bug
> Components: JUL adapter
> Affects Versions: 2.13.3
> Environment: {{monospaced text}}
> Reporter: Emmanuel Bourg
> Priority: Minor
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Setting a {{java.util.logging.Filter}} on a logger has no effect when the JUL
> adapter is used. For example with:
> {code:java}
> Logger logger = new CoreLoggerAdapter().getLogger("test");
> logger.setFilter(record -> false);
> logger.info("Test");
> {code}
> the message is still logged.
> {{org.apache.logging.log4j.jul.ApiLogger}} does check the filter in its
> {{log(LogRecord)}} method, but the other log methods bypass it and call
> directly the underlying log4j logger.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)