Springboot Official Document Address https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/# Boot-features-custom-log-configuration
Spring Official Address Https://spring.io/docs
Using Springboot the default is to print the log in the console, but he does not export to the file by default, so to configure the output path, then write the output path,
We look at the official case
By default, Spring boot will only log on to the console and will not write log files. If you want to write a log file other than console output, you need to set the Logging.file or Logging.path property (for example, in application.properties).
Writes the specified log file. The name can be the exact location or relative to the current directory.
Writes spring.log to the specified directory. The name can be the exact location or relative to the current directory.
Logging: Level :DEBUG ./logs/core.log INFO
Then start the project. See if the file is generated
Log generated on local address
And, of course, he has other property configurations.
If you want to play with him, go and see his documentation and his source code comments. There will be the answer you want.
Springboot output log to the specified directory, simple rude, springboot output mybatis log