Tomcat Localhost Access Log Missing Failed Requests – Troubleshooting

loggingsslssl-certificatetomcat

Default Tomcat 8.5 logs do not appear to show any failed requests, or anything about the SSL handshakes. Specifically the localhost log and catalina.out

See this question for context about the type of failed request:
Intermittent Curl 35 error when using self signed certificate on Tomcat

This question seems to indicate that it is not possible….?
Tomcat access logs – are failed requests included?

I tried turning on debug, but still couldn't find anything related to a failed request.

Best Answer

If you want to log the connection details, you need to increase to log levels of loggers org.apache.coyote and org.apache.tomcat.util.net, by putting:

org.apache.tomcat.util.net.level = FINE
org.apache.coyote.level = FINE

in $CATALINA_BASE/conf/logging.properties and increasing the log level of some handler, e.g.:

java.util.logging.ConsoleHandler.level = FINE

whose messages eventually end up in catalina.out.

This requires a server restart. You should be able to do the same thing through JMX (e.g. jconsole), without a restart.