spring-boot default log location

Spring Boot uses Commons Logging for all internal logging, but leaves the underlying log implementation open.

Default configurations are provided for Java Util Logging, Log4J, Log4J2 and Logback. In each case loggers are pre-configured to use console output with optional file output also available.

From the Spring Boot logging documentation.

The default log configuration will echo messages to the console as they are written. So until you explicitly specify a file as you described, it stays in the Console.


By default Spring Boot does not output logs to any file. If you want to have logs written in a file (in addition to the console output) then you should use either of logging.file or logging.path properties (not both).

In application.properties, just set:

logging.file=/home/ubuntu/spring-boot-app.log

This will create a spring-boot-app.log file under /home/ubuntu.


By default, Spring Boot logs only to the console and does not write log files. If you want to write log files in addition to the console output, you need to set a logging.file or logging.path property (for example, in your application.properties).

Below codes in your application.properties will write the log into /home/user/my.log:

logging.path = /home/user
logging.file = my.log