Spring Boot enable http requests logging (access logs)

前端 未结 4 754
谎友^
谎友^ 2020-12-05 04:18

How to enable access logs in an embedded tomcat server provided by spring boot? I\'ve tried this in application.properties but

4条回答
  •  被撕碎了的回忆
    2020-12-05 04:43

    Try

    server.tomcat.accessLogEnabled=true
    server.tomcat.accessLogPattern=%a asdasd
    

    and look in /tmp/tomcat../logs for the output files. Set server.tomcat.basedir property to change the directory.

提交回复
热议问题