I'd like to enable Tomcat logging and changed Tomcat/conf/logging.properties
(I enabled org.apache.catalina.util.LifecycleBase.level = FINE
)
However, when I start Tomcat from Eclipse, it ignores my settings and shows logs as before.
The internal logging for Apache Tomcat uses JULI, a packaged renamed fork of Apache Commons Logging that is hard-coded to use the java. util. logging framework. This ensures that Tomcat's internal logging and any web application logging will remain independent, even if a web application uses Apache Commons Logging.
The main Apache Tomcat configuration file is at /opt/bitnami/tomcat/conf/server. xml. Once Apache Tomcat starts, it will create several log files in the /opt/bitnami/tomcat/logs directory. The main log file is the catalina.
Tomcat that is started from Eclipse uses configuration that is specified in its Properties. By default, logging configuration is not specified.
So, open Eclipse -> select Tomcat -> Properties
, click Open Launch configuration
and in Arguments
tab add -Djava.util.logging.config.file="your-tomcat-folder\conf\logging.properties" -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With