How to make Tomcat 7 log debugging info?

43,074

Solution 1

From Tomcat 7 documentation (at https://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_java.util.logging_(default) ):

The default logging.properties in the JRE specifies a ConsoleHandler that routes logging to System.err. The default conf/logging.properties in Apache Tomcat also adds several FileHandlers that write to files.

A handler's log level threshold is INFO by default and can be set using SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST or ALL. You can also target specific packages to collect logging from and specify a level.

Here is how you would set debugging from Tomcat. You would need to ensure the ConsoleHandler's (or FileHandler's') level is also set to collect this threshold, so FINEST or ALL should be set. Please refer to java.util.logging documentation in the JDK for the complete details:

org.apache.catalina.level=FINEST

Solution 2

In tomcat 7, logging.properties contains an entry: #org.apache.jasper.compiler.TldLocationsCache.level = FINE, which is commented out by default. Would removing the comment help give you the information you are looking for?

Share:
43,074

Related videos on Youtube

Keyslinger
Author by

Keyslinger

fajandome con vaina

Updated on September 18, 2022

Comments

  • Keyslinger
    Keyslinger over 1 year

    Tomcat 7 takes more than 21 minutes to start:

    ene 09, 2013 10:01:39 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 1290787 ms
    

    When it finishes it says that it's scanning JARs that don't contain TLDs:

    ene 09, 2013 10:59:39 AM org.apache.jasper.compiler.TldLocationsCache tldScanJar
    INFO: Al menos un JAR, que se ha explorado buscando TLDs, aún no contenía TLDs. Activar historial de depuración para este historiador para una completa lista de los JARs que fueron explorados y de los que nos se halló TLDs. Saltarse JARs no necesarios durante la exploración puede dar lugar a una mejora de tiempo significativa en el arranque y compilación de JSP .
    

    A paste of the entire log can be found here.

    After searching the error, I discovered that someone had resolved the same issue by modifying /var/lib/tomcat7/conf/logging.properties to log more verbose information.

    But when I set org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level to FINE as suggested in the link, the output of my log remains unchanged.

    How can I make Tomcat 7 log more?