You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now the only reason to have Spring as a direct dependency is that we use the OncePerRequestFilter which in turn is just an implementation detail.
Other than that we are just providing a servlet filter that, in theory, would work with any other framework just as good, as long as it's running in a servlet container.
That would mean we change the scope (and the name) to something more generic, e.g servlet-logging. Which got me thinking - we're probably not the first ones to do something like this.
Most of them are either just a proof of concept or too tightly coupled to a certain logging framework. But I think we can steal some ideas from them.
For example logback-access by default logs full requests/responses like this:
GET /logback-demo/index.jsp HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20070312 Firefox/1.5.0
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://localhost:8080/logback-demo/login.jsp
Cookie: JSESSIONID=15c7tqi9ehlwk; OID324nkzcmr=null; OID32862zgoa=null;
HTTP/1.1 200 OK
Content-Type: text/html; charset=iso-8859-1
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Set-Cookie: JSESSIONID=bgebt99ce9om;path=/logback-demo
<html>
<head>
<LINK REL=StyleSheet HREF="css/pk.css" />
</head>
<body>
<h2>Logback demo center</h2>
[snip, so that text is reasonably sized]
If you combine this with color-coded console output, one could e.g. produce log output that looks like httpie which would be pretty cool for local development.
The text was updated successfully, but these errors were encountered:
Right now the only reason to have Spring as a direct dependency is that we use the
OncePerRequestFilter
which in turn is just an implementation detail.Other than that we are just providing a servlet filter that, in theory, would work with any other framework just as good, as long as it's running in a servlet container.
That would mean we change the scope (and the name) to something more generic, e.g
servlet-logging
. Which got me thinking - we're probably not the first ones to do something like this.I've found:
Most of them are either just a proof of concept or too tightly coupled to a certain logging framework. But I think we can steal some ideas from them.
For example logback-access by default logs full requests/responses like this:
If you combine this with color-coded console output, one could e.g. produce log output that looks like httpie which would be pretty cool for local development.
The text was updated successfully, but these errors were encountered: