简体   繁体   中英

Issues while configuring log4j 2.17 jar on tomcat 7, java 8

Tomcat: 7.0.90

Java: 1.8.0_161

Ant project

I'm having a problem while configuring the log4j jars as suggested in the https://logging.apache.org/log4j/2.x/manual/migration.html using the bridge.

Long story short, I've removed the old jar files and added the new ones(the bridge, the log4j2 jar and the core jar). I've also removed the old jar from the classpath and added the new ones there.

When I attempt to run the project, it's running as it was running before, however no logs are getting generated.

From the Tomcat logs though, I can see the information message: At least one JAR was scanned for TLDs yet contained no TLDs.

I think that the error might occur due to the log4j2 jar, which gets compiled in java 9 as far as I've read in other articles. However, the java 9 part of the code is located in the META-INF folder, which means that it should be ignored(correct me if I'm wrong).

Thanks in advance for any help!

As Piotr P. Karwasz stated in the comments of the question, the issue was resolved using the links he provided. Just a quick reminder, investigate your log4j1 configurations carefully and follow the tips in the links above.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM