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=./
posted @ 2017-06-08 15:36  程序员十三  阅读(2705)  评论(0编辑  收藏  举报