Tomcat log file path

Tomcat log files are stored in the ${tomcat_HOME}/logs directory in two formats: localhost_access_log.YYYY-MM-dd. TXT and localhost-YYYY-MM-dd. log. For example, localhost_access_log.2021-06-30.txt and localhost.2021-06-30.log

localhost_access_log.yyyy-MM-dd.txt

TXT Records the content of HTTP requests

192.1688.101.- -19/May/2021:18:00:32 +0800] "POST/API/login/login HTTP / 1.0" 200 8017
192.1688.101.- -19/May/2021:18:00:42 +0800] "POST/API/login/logout HTTP / 1.0" 200 46
192.1688.101.- -19/May/2021:18:00:53 +0800] "POST/API/sayhello HTTP / 1.0 / yes" 200 46
Copy the code

localhost.yyyy-MM-dd.log

Localhost. 2021-06-30. The log records javax.mail. Servlet. ServletContext# log (Java. Lang. String) log records

24-May-2021 13:44:44.566Information [localhost - startStop -2] org.apache.catalina.core.ApplicationContext.log Destroying Spring FrameworkServlet 'springServlet'
24-May-2021 13:44:44.583Information [localhost - startStop -2] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext
24-May-2021 13:44:44.647Information [localhost - startStop -2] org.apache.catalina.core.ApplicationContext.log Uninstalling JUL to SLF4J bridge
24-May-2021 13:44:44.647Information [localhost - startStop -2] org.apache.catalina.core.ApplicationContext.log Shutting down Logback
24-May-2021 13:45:11.969Information [localhost - startStop -1] org.apache.catalina.core.ApplicationContext.log 1 Spring WebApplicationInitializers detected on classpath
Copy the code