Page 1 of 1

How does Tomcat print detailed log information

Posted: Tue Sep 25, 2018 3:45 am
by youyou
Tomcat has so little background information that it can't figure out where the problem is (and there is no relevant information in the Tomcat log directory). According to the online query, Tomcat Log is configured to record more Log information before further analyzing the reason.

Re: How does Tomcat print detailed log information

Posted: Tue Sep 25, 2018 3:46 am
by youyou
In the WEB-INF/classes directory of Web applications that cannot be started (I'm here at st), create a new logging.properties file, which is shown below:
handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

org.apache.juli.FileHandler.level = FINE
org.apache.juli.FileHandler.directory = ${catalina.base}/logs
org.apache.juli.FileHandler.prefix = error-debug.

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

Re: How does Tomcat print detailed log information

Posted: Tue Sep 25, 2018 3:47 am
by youyou
After starting Tomcat again, the reason for the error is shown in the background, and the file "error-debug.2013-11-23.log" also appears in the log directory of Tomcat, where the error details are recorded. The following contents are for reference (everyone has different reasons for making mistakes, which need to be analyzed and solved by specific problems)

Re: How does Tomcat print detailed log information

Posted: Fri Sep 28, 2018 3:56 am
by summer
:P Good,help me a lot

Re: How does Tomcat print detailed log information

Posted: Fri Sep 28, 2018 4:06 am
by youyou
Thank you. I'm glad I could help :P