Chris,

>-----Original Message-----
>From: Christopher Schultz [mailto:ch...@christopherschultz.net]
>Subject: Re: Logging request parameters - Filter vs Servlet
>
>Leo,
>
>On 3/29/2011 12:57 PM, Leo Donahue - PLANDEVX wrote:
>> Where do you initialize the Logger (Filter or Servlet)?
>
>Which logger?

I don't know what I don't know... Log4j I guess.  That is what everyone 
recommends.

>
>> The servlet 2.5 spec says you can use filters for logging, but since
>> I'm not modifying the request or response, is logging from within a
>> filter the right approach to logging request parameters?
>
>That depends upon your requirements. What are they?

I just want to capture the request parameters on a certain web app and log them 
(time and what they were) in a separate log file from the standard logs, so 
that I don't have to hunt them down in the standard Tomcat logs.  The security 
tool that our telecom office uses for auditing our sites makes quite a mess of 
my standard logs periodically.

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

An example of things I don't know that I don't know...


Leo

Reply via email to