tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leo Donahue - PLANDEVX <>
Subject RE: Logging request parameters - Filter vs Servlet
Date Wed, 30 Mar 2011 16:28:51 GMT

>-----Original Message-----
>From: Christopher Schultz []
>Subject: Re: Logging request parameters - Filter vs Servlet
>> I don't know what I don't know... Log4j I guess.  That is what
>> everyone recommends.

ServletContext logging then?

>There is an AccessLogValve that you can use if you know which request
>parameters you want to log. There is also a RequestDumperValve (and
>RequestDumperFilter in 7.0) that you can use to dump everything from the
>request. See the docs for details.
>Would those work for you?

The AccessLog pattern I'm using:
pattern="%h %l %u %t %r %q %s %b"

The results: - - [29/Mar/2011:16:02:39 -0700] "POST /oppositioncase/oppositioncase.faces HTTP/1.1"
200 38621

My web app uses the JSF framework, forgot to mention that.


Those are the parameters I'm trying to capture, along with the map image url.  
A.  We'd like to know how many requests actually generated a map image.
B.  We'd like to know whether this app is searching for parcels primarily in the unincorporated
areas of the County, or parcels located within a city jurisdiction.  That part I can figure
out once I know which parcels people are searching.

>>Note that reading request parameters in a Filter may trigger parsing of a POST request
>>which may not be something you want to happen on every request.

I guess my only option then is to log them from the web app.  But somewhere I've read that
is the wrong/lazy way to do logging.
View raw message