ppkarwasz commented on issue #2353:
URL: 
https://github.com/apache/logging-log4j2/issues/2353#issuecomment-1979590532

   @abpicoli1,
   
   Running the test in a standalone environment I am not able to reproduce it.
   
   ### Educated guess
   
   You are using the JUL-to-Log4j API bridge. In version `2.22.1` the 
implementation of the 
[`java.util.logging.Logger#setLevel`](https://docs.oracle.com/en/java/javase/21/docs/api/java.logging/java/util/logging/Logger.html#setLevel(java.util.logging.Level))
 was broken and the changes to the level didn't propagate as required. We fixed 
it in #2281.
   
   My guess is that something in your code must be calling:
   ```java
   
java.util.logging.Logger.getRootLogger().setLevel(java.util.logging.Level.INFO);
   ```
   which in `2.22.1` is basically a no-op, while in `2.23.0` changes the 
logging level of all your loggers.
   
   ### Workarounds
   
   If my guess is right, setting the level to `TRACE` on a more specific logger 
than the root logger, should solve the issue:
   ```xml
   <Logger name="com.example" level="TRACE"/>
   ```
   
   Another workaround would be to set the `log4j2.julLoggerAdapter` Java system 
property to `org.apache.logging.log4j.jul.ApiLoggerAdapter`
   
   Any chance you can set a breakpoint on 
`org.apache.logging.log4j.jul.CoreLogger#setLevel`?


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to