Goooler opened a new pull request, #2182:
URL: https://github.com/apache/logging-log4j2/pull/2182

   I'm using a lib depends on Log4j with ProGuard enabled, throwing some errors 
like:
   ```
   Exception in thread "main" java.lang.ExceptionInInitializerError
       at org.apache.logging.log4j.LogManager.<clinit>(SourceFile:153)
       at org.apache.poi.POIDocument.<clinit>(SourceFile:65)
       at io.github.goooler.exporter.Res2XlsKt.res2xls(SourceFile:18)
       at io.github.goooler.exporter.MainKt.main(SourceFile:6)
   Caused by: java.lang.IllegalStateException: 
java.lang.InstantiationException: 
org.apache.logging.log4j.message.DefaultFlowMessageFactory
       at 
org.apache.logging.log4j.spi.AbstractLogger.createDefaultFlowMessageFactory(SourceFile:239)
       at org.apache.logging.log4j.spi.AbstractLogger.<init>(SourceFile:138)
       at org.apache.logging.log4j.status.StatusLogger.<init>(SourceFile:141)
       at org.apache.logging.log4j.status.StatusLogger.<clinit>(SourceFile:91)
   ```
   
   This file could be interpreted by ProGuard /R8 automatically, it's useful 
for ones who are facing the same issue above, no need to copy-paste rules once 
and once again.
   
   
   ## Checklist
   
   * Base your changes on `2.x` branch if you are targeting Log4j 2; use `main` 
otherwise
   * `./mvnw verify` succeeds (if it fails due to code formatting issues 
reported by Spotless, simply run `./mvnw spotless:apply` and retry)
   * Non-trivial changes contain an entry file in the `src/changelog/.2.x.x` 
directory
   * Tests for the changes are provided
   * [Commits are 
signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits)
 (optional, but highly recommended)
   


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