You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "mbain-cincom (via GitHub)" <gi...@apache.org> on 2023/03/20 22:28:40 UTC

[I] Initializing Log4j1 bridge with properties object blocks Log4j2 logging since 2.17.2 (logging-log4j2)

mbain-cincom opened a new issue, #1382:
URL: https://github.com/apache/logging-log4j2/issues/1382

   ## Description
   We have a legacy class that loads Log4J using PropertyConfigurator.configure(Properties) via the bridge libraries.  Since 2.17.2, once this line is hit our Log4j2 statements will stop logging.  I have been able to replicate through 2.20.  Changing between 2.17.1 and 2.17.2 in the attached Maven project will replicate the before and after scenarios.
   
   ## Configuration
   
   **Version:** 2.17.2
   
   **Operating system:** Windows Server 2012
   
   **JDK:** 1.8 - 11
   
   ## Reproduction
   Project attached
   [Log4J2Issue.zip](https://github.com/apache/logging-log4j2/files/11023540/Log4J2Issue.zip)
   


-- 
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: notifications-unsubscribe@logging.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Initializing Log4j1 bridge with properties object blocks Log4j2 logging since 2.17.2 (logging-log4j2)

Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz commented on issue #1382:
URL: https://github.com/apache/logging-log4j2/issues/1382#issuecomment-1477056734

   `PropertyConfigurator#configure()` was a no-op before version 2.17.2 (cf. [source code](https://github.com/apache/logging-log4j2/blob/rel/2.17.1/log4j-1.2-api/src/main/java/org/apache/log4j/PropertyConfigurator.java)).
   
   The call must provide a broken configuration (you can debug it by running `-Dlog4j2.debug=true`), hence the logs vanish.


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Initializing Log4j1 bridge with properties object blocks Log4j2 logging since 2.17.2 (logging-log4j2)

Posted by "mbain-cincom (via GitHub)" <gi...@apache.org>.
mbain-cincom commented on issue #1382:
URL: https://github.com/apache/logging-log4j2/issues/1382#issuecomment-1477178651

   @ppkarwasz 
   
   Thank you for the reply, it filled in the piece I was missing.  It wasn't a broken configuration, rather an incorrect mindset on my part.  Previously this application was using Log4j2 and Log4j1 for independent purposes.  In 2.17.1 we were able to get the proper result based on the configure() option not doing anything and having a logger that matched in our log4j2.xml.  As soon as it was actually performing an initialization it is now overwriting our log4j2 configuration with our legacy Log4j1 configuration, and our Log4j2 usage in essence no longer has loggers to work with.  We will have to look into potential solutions either through context or creating a custom configuration factory, etc.


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Initializing Log4j1 bridge with properties object blocks Log4j2 logging since 2.17.2 (logging-log4j2)

Posted by "mbain-cincom (via GitHub)" <gi...@apache.org>.
mbain-cincom closed issue #1382: Initializing Log4j1 bridge with properties object blocks Log4j2 logging since 2.17.2
URL: https://github.com/apache/logging-log4j2/issues/1382


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Initializing Log4j1 bridge with properties object blocks Log4j2 logging since 2.17.2 (logging-log4j2)

Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz commented on issue #1382:
URL: https://github.com/apache/logging-log4j2/issues/1382#issuecomment-1477340657

   There is an open JIRA issue ([LOG4J2-3467](https://issues.apache.org/jira/browse/LOG4J2-3467)) to provide users a way to disable the improvement in `log4j-1.2-api` introduced in version 2.17.2. We should probably consider it solving it.


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org