校园商铺-2Logback配置与使用-3验证配置

1. 验证logback配置

1.1. 启动tomcat,得到CATALINA_BASE地址:

## 1.2 访问接口,查看日志

浏览器打开http://localhost:18080/o2o/superadmin/listarea

控制台输出日志 debug.log ```#log 2019-09-23 20:42:16.910[http-nio-18080-exec-2]DEBUGcom.csj2018.o2o.dao.AreaDao.queryArea-==> Preparing: select * from tb_area order by priority desc; 2019-09-23 20:42:16.960[http-nio-18080-exec-2]DEBUGcom.csj2018.o2o.dao.AreaDao.queryArea-==> Parameters: 2019-09-23 20:42:16.991[http-nio-18080-exec-2]DEBUGcom.csj2018.o2o.dao.AreaDao.queryArea-<== Total: 3 2019-09-23 20:42:17.003[http-nio-18080-exec-2]DEBUGcom.csj2018.o2o.web.superadmin.AreaController-costTime:[748ms] ``` info.log ```#log 2019-09-23 20:42:16.249[http-nio-18080-exec-2]INFO com.csj2018.o2o.web.superadmin.AreaController-===start=== 2019-09-23 20:42:17.007[http-nio-18080-exec-2]INFO com.csj2018.o2o.web.superadmin.AreaController-===end=== ``` warn.log ```#log ``` error.log ```#log 2019-09-23 20:42:17.003[http-nio-18080-exec-2]ERRORcom.csj2018.o2o.web.superadmin.AreaController-test error! ``` ## 2.验证.gz文件生成

不用关闭tomcat,更改电脑时间到第二天,再次在浏览器打开http://localhost:18080/o2o/superadmin/listarea

posted on 2019-09-23 21:00  singleSpace  阅读(274)  评论(0编辑  收藏  举报