I have a war (built with Java 8) that's using Logback. This is working well in Tomcat 9.0.* but now I want to deploy it on Tomcat 10.1 and the logging from my app is not working. I can see Tomcat's log messages from java.util.logging, like org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory, but nothing from my app.
My dependencies are:
- ch.qos.logback:logback-classic:jar:1.2.11
- ch.qos.logback:logback-core:jar:1.2.11
- org.slf4j:slf4j-api:jar:1.7.36
- org.slf4j:jcl-over-slf4j:1.7.36
Setting <configuration debug="true" in my logback.xml didn't produce anything, and neither did setting logback.configurationFile parameter manually.
How can I debug this? Maybe enabling a particular logger in Tomcat?
I know there are other problems in my app (javax - jakarta issue), I don't think they would cause this logback issue... without logging it will be hard to fix the other issues.
Edit: The Tomcat starts well with Java 11, just my war is built with Java 8 and the war seems to deploy successfully.
In the tomcat documentation for vers 10.1.X :
I think deploying the war to the webapps-javaee directory instead of the webapps directory will solve your problem