You can specify logging.file or logging.path , but not both.
1. Using logging.file
You need to add the following property:
logging.file = yourlogfile.log
In the Spring Boot Documentation :
By default, Spring Boot will only boot to the console and will not write log files. If you want to write log files in addition to console output, you need to set the logging.file or logging.path property (for example, in your application application.properties).
In Spring Download the document registration method :
If the only change you need to make for logging is to set the levels of different loggers, then you can do this in application.properties using the prefix "logging.level", for example. You can also specify the location of the login file (in addition to the console) using "logging.file".
2. Using logging.path
You can also set logging.path , then the log file will be called spring.log :
logging.path = /path/to/logs
In Spring Boot Document :
[Using logging.path] Writes spring.log to the specified directory. Names may be the exact location or relative to the current directory.
springframework.guru on Spring Log Download :
There is also a logging.path property to specify the path for logging the file. If you use it, Spring Boot creates the spring.log file in the specified path. However, you cannot specify both logging.file and logging.path together. If this is done, Spring Boot will ignore others as well.
alexbt
source share