Spring Boot: How can I set the logging level with application.properties? - Stack Overflow
You can do that using your application.properties.
logging.level.=ERROR -> Sets the root logging level to error
...
logging.level.=DEBUG -> Sets the root logging level to DEBUG
logging.file=${java.io.tmpdir}/myapp.log -> Sets the absolute log file path to TMPDIR/myapp.log
A sane default set of application.properties regarding logging using profiles would be: application.properties:
spring.application.name=<your app name here> logging.level.=ERROR logging.file=${java.io.tmpdir}/${spring.application.name}.log application-dev.properties:
logging.level.=DEBUG logging.file= Read full article from Spring Boot: How can I set the logging level with application.properties? - Stack Overflow
No comments:
Post a Comment