Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Silence Tomcat INFO logs, disableChecksAndJarScan
The TestTomcat worked perfectly well, but generated chatty logs. The first step was to call `tomcat.setSilent(true)` to suppress most of these. However, these messages remained: Nov 06, 2023 4:40:21 PM org.apache.jasper.servlet.TldScanner scanJars INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. Nov 06, 2023 4:40:21 PM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalsForLeaks WARNING: You need to add "--add-opens=java.base/java.lang=ALL-UNNAMED" to the JVM command line arguments to enable ThreadLocal memory leak detection. Alternatively, you can suppress this warning by disabling ThreadLocal memory leak detection. Nov 06, 2023 4:40:21 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesRmiTargets WARNING: You need to add "--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED" to the JVM command line arguments to enable RMI Target memory leak detection. Alternatively, you can suppress this warning by disabling RMI Target memory leak detection. I had to dig through the Tomcat source and API docs to figure out that I needed to update the StandardContext returned from `tomcat.addWebapp()`. Fortunately I remembered from the tutorials linked from the class comment that this was indeed possible and OK to do. - https://github.com/apache/tomcat - https://tomcat.apache.org/tomcat-10.1-doc/api/index.html
- Loading branch information