Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat ignores logging.properties when started from Eclipse

Tags:

eclipse

tomcat

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.

like image 474
kolobok Avatar asked May 26 '17 10:05

kolobok


People also ask

What logging framework does Tomcat use?

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.

Do Apache Tomcat generate log files?

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.


1 Answers

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 configurationand in Arguments tab add -Djava.util.logging.config.file="your-tomcat-folder\conf\logging.properties" -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager.

like image 116
kolobok Avatar answered Dec 25 '22 16:12

kolobok