springboot开启access_log日志输出

由于在调试时需要查看access_log日志,但是springboot默认并没有开启,因此查看了一下文档,在springboot的配置文件中添加如下设置,即可将日志输出当磁盘文件中以供查看。

#日志开关
server.tomcat.access-log-enabled=true
#日志格式
server.tomcat.access-log-pattern=%h %l %u %t "%r" %s %b %D
#日志输出目录,这里是设置为当前目录下
server.tomcat.basedir=./
原文地址:https://www.cnblogs.com/han-1034683568/p/6963144.html