[ 
https://issues.apache.org/jira/browse/LOG4J2-3634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marcel Koch updated LOG4J2-3634:
--------------------------------
    Description: 
In short: The loggers are altered before the handlers are added to the (root) 
logger. This leads to propers loggers but without any handler.

My idea would be to move the propagation to a later point in time. So, I moved 
it to the method {{{}publish(){}}}. 

Here is demo repo to reproduce the issue: 
[https://github.com/mknet/tomcat-webapp-log4j-jul-bridge]

Here is the Pull Request with my approach to fix the issue: 

  was:
In short: The loggers are altered before the handlers are added to the (root) 
logger. This leads to propers loggers but without any handler.

My idea would be to move the propagation to a later point in time. So, I moved 
it to the method {{{}publish(){}}}. 

I will add links to my Pull Request and a example project later on.


> Log4JBridgeHandler & Tomcat Webapps: Propagating log levels leads to no 
> handlers in the (root) logger
> -----------------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-3634
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3634
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: JUL adapter
>    Affects Versions: 2.19.0
>         Environment: Apache Tomcat 9.0.68
> JDK Corretto 18
> macOS 12.6.1 aarch64
>            Reporter: Marcel Koch
>            Priority: Blocker
>
> In short: The loggers are altered before the handlers are added to the (root) 
> logger. This leads to propers loggers but without any handler.
> My idea would be to move the propagation to a later point in time. So, I 
> moved it to the method {{{}publish(){}}}. 
> Here is demo repo to reproduce the issue: 
> [https://github.com/mknet/tomcat-webapp-log4j-jul-bridge]
> Here is the Pull Request with my approach to fix the issue: 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to