Java常用框架日志路径

Java开发时经常需要打印一些调试日志,比如请求报文、响应报文,有时会使用调试来查看,有时会字节打印一些字段,也有时会写日志辅助类来操作,这里介绍一些常用框架的日志路径,可以简单一行配置即可查看日志

 

1.Tomcat

org.apache.coyote.http11.Http11InputBuffer:tomcat请求报文日志,可以打印出所有进入tomcat服务器的http请求报文,如

2020-06-19 10:47:19.244 DEBUG 6928 --- [p-nio-80-exec-1] o.a.coyote.http11.Http11InputBuffer      : Received [POST /example/jeecg-boot/sys/login HTTP/1.1
x-forwarded-host: localhost:8088
x-forwarded-proto: http
x-forwarded-port: 8088
x-forwarded-for: 127.0.0.1
accept-language: zh-CN,zh;q=0.9,en;q=0.8
accept-encoding: gzip, deflate, br
referer: http://localhost:8088/
sec-fetch-dest: empty
sec-fetch-mode: cors
sec-fetch-site: same-origin
origin: http://localhost:8088
content-type: application/json; charset=UTF-8
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36
x-requested-with: XMLHttpRequest
accept: application/json, text/plain, */*
cache-control: no-cache
pragma: no-cache
content-length: 81
connection: close
host: localhost

{"username":"jeecg","password":"123456","captcha":"ddd","checkKey":1592534836521}]

 

你可能感兴趣的:(log4j)