注册 bean
1 |
|
在logback.xml配置
1 | <logger name="org.springframework.web.filter.CommonsRequestLoggingFilter" level="DEBUG"/> |
日志打印
1 | 19-05-06 14:37:23 DEBUG o.s.w.f.CommonsRequestLoggingFilter.beforeRequest(47) | Before request [uri=/szim/triple.do?action=getJsonUserFeeInfo&encrypt=TJ943tVLlkJmwouCRnJgj6aDOGqm5VBxeLiNqpcIOdUHaByb%2FJ0RK%2FFQvzJcK3TL0aPmKvSdKhNL%2FUl6ZvHznEFR2ohRKF8HTxwaqss9KCZ66AQ4Dx60ZBWrXdju2nlIohMo9O2d0Ia5Bvl6HEpmhQ%3D%3D&ak=0f882bab896ca50e10ef389f12c279c195d7c1810dc3e9e55db6a0057335f148b61761ab383957431d94d5e9982cff0d389021fdf17e25a5843f96cd0a448ef22e47d6abae9bacb5cc7e1cb2ba30a7c0b08d423a5fcb644e2e9392d0a685d0f73a416470d9a074eff6582ad7d05fb2eadb925d798093519c6f1351455dc84296;client=0:0:0:0:0:0:0:1;session=B6FBF9F2B61AA8F5C715A90C2FB1D328;headers={host=[localhost:8080], connection=[keep-alive], pragma=[no-cache], cache-control=[no-cache], accept=[application/json, text/javascript, */*; q=0.01], dnt=[1], x-requested-with=[XMLHttpRequest], user-agent=[Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1], referer=[http://localhost:8080/szim/triple.do?U=ybFlMQgKMvBjGbYIUs+dhtVOInHIaCqdM3ZmiOQn/r0GvzWE2sMZdzaCSHhclamx56V86dWa+JB3unGmNOwvKQ==&t=1557124281371], accept-encoding=[gzip, deflate, br], accept-language=[zh-CN,zh;q=0.9,en;q=0.8], cookie=[JSESSIONID=B6FBF9F2B61AA8F5C715A90C2FB1D328]}] |