Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the crash log of spring boot embedded Tomcat?

I am using Spring boot 1.3.1 with its embedded Tomcat container. I am new to Spring boot.

I run with as a standalone jar via java -jar myApp.jar.

I set the log file and tomcat location in the application.properties:

logging.file=myApp.log
server.tomcat.basedir=./tomcat

However, the app exits quite often QUIETLY. In the log file nothing informative of the exit.

So my question is how to enable some more detailed logging of the application, or is there some method can be used to trouble shooting in this situation?

Thanks!

like image 832
xing Avatar asked Jan 21 '16 19:01

xing


1 Answers

You can enable logging via application.properties using properties starting with logging.level. To enable debug logging for everything:

logging.level.ROOT=DEBUG

Alternatively, you can enable logging for a particular package (and its sub packages). For example:

logging.level.org.apache.tomcat=DEBUG
like image 189
Andy Wilkinson Avatar answered Nov 24 '22 04:11

Andy Wilkinson