How to enable access logs in an embedded tomcat server provided by spring boot? I\'ve tried this in application.properties
but
With Spring Boot 2.X, if you want to manage Access logs, add these lines to your application.yml
file:
server:
tomcat:
basedir: /home/tmp
accesslog:
enabled: true
It will create a folder named logs
in the basedir you defined (/home/tmp
here) containing the access log files.
If you want to have access logs in the console do like that:
server:
tomcat:
accesslog:
enabled: true
directory: /dev
prefix: stdout
buffered: false
suffix:
file-date-format:
It will rediect logs to /dev/stdout
More informations: https://community.pivotal.io/s/article/how-to-configure-access-log-entries-for-a-spring-boot-app?language=en_US