cocoon-dev mailing list archives

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

Ralph

-----Original Message-----
From: Vadim Gritsenko [mailto:vadim@reverycodes.com] 
Sent: Wednesday, April 14, 2004 1:27 PM
To: dev@cocoon.apache.org
Subject: Re: [PATCH]: Re: Logging all requests

Ralph Goers wrote:

>Surjan,
>
>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".

Vadim


>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 Cocoon.java to call both methods.
>
>Note that these methods return void instead of boolean, as Cocoon.java
could
>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, Cocoon.java doesn't care.
>
>I'll be happy to provide a patch to do all this.
>
>Ralph
>  
>

<snip/>

Mime
View raw message