How do you tell Spring Boot to send the embedded Tomcat's access logs to stdout?

后端 未结 5 721
萌比男神i
萌比男神i 2020-12-28 08:47

In a standalone Spring Boot web application (executable jar), how do you tell Spring Boot that we want the embedded Tomcat instance\'s HTTP access logs to be sent to stdout?

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-28 09:21

    This did it for me on Spring Boot 2.x:

    server.tomcat.accesslog.enabled=true
    server.tomcat.accesslog.directory=/dev
    server.tomcat.accesslog.prefix=stdout
    server.tomcat.accesslog.buffered=false
    server.tomcat.accesslog.suffix=""
    server.tomcat.accesslog.file-date-format=""
    

提交回复
热议问题