cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <>
Subject RE: [PATCH]: Re: Logging all requests
Date Wed, 14 Apr 2004 20:49:34 GMT
Sounds OK to me.  Thanks.


-----Original Message-----
From: Vadim Gritsenko [] 
Sent: Wednesday, April 14, 2004 1:27 PM
Subject: Re: [PATCH]: Re: Logging all requests

Ralph Goers wrote:

>I have a couple of uses for this, but I'll need to modify it slightly. I
>actually need access before and after the request.  Before the request I
>need to do audit logging and capture the start time.  After the request I
>want to update our JMX statistics.  Currently I have to do all this with a
>servlet filter, but I would prefer to do this with a Cocoon component.
>My proposals:
>1. Change the name from RequestLogger to RequestMonitor (or something else)

I think the word you are looking for is "Listener", and method names 
start on "on".


>as it is not necessarily a Logger and doesn't extend one.
>2. Provide two methods; 
>	void monitorRequestStart(Environment env)
>	void monitorRequestEnd(Environment env)
>3. Change the code in to call both methods.
>Note that these methods return void instead of boolean, as
>care less what happened inside these calls.  Also, the calls should be
>wrapped in try/catch blocks that log and ignore any errors in these methods
>since, again, doesn't care.
>I'll be happy to provide a patch to do all this.


View raw message