Larry,
The ActionServlet subclassing solution sounds like a nice way to handle
this. Thanks for your input. 
If anyone has better ideas or they have already implemented this solution
please let me know.

Thanks,
Shaligram

Phone: (401)392-7948
Fax:(401)392-4974/4975


-----Original Message-----
From: Larry Young [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 27, 2003 2:02 PM
To: Log4J Users List
Subject: Re: Generic logger for Webapps


Shaligram,

         If you are using Tomcat, someone posted a "Filter" solution a few 
days ago for this particular situation.  If you can't do it that way, I 
would think you could easily subclass the Struts ActionServlet class and 
simply add/remove the MDC value before/after calling the ActionServlet's 
method to handle the request.

         I am probably going to do something like that myself, so I'd be 
interested in hearing from others as well on how best to do this.

--- regards ---
Larry


At 01:27 PM 8/27/03 -0400, you wrote:
>Is there a generic way for existing web applications to send the logs to a
>file so that the logs can be sorted (using tools such as logfactor) based
on
>client/session ID? The web app uses JSP->Struts->Action
>Servlets->EJBs->Database. I know there are NDC/MDC but they need push/pop
>calls in each and every action servlet needing code changes in lot of
files.
>Is there any way where for each session you prefix all logs for that
session
>and newer sessions will have logs with another prefixes. The prefix need to
>be removed at the end of that session.
>
>Thanks,
>Shaligram
>
>-----------------------------------------
>This email may contain confidential and privileged material for the sole 
>use of the intended recipient(s). Any review, use, retention, distribution 
>or disclosure by others is strictly prohibited. If you are not the 
>intended recipient (or authorized to receive for the recipient), please 
>contact the sender by reply email and delete all copies of this 
>message.  Also, email is susceptible to data corruption, interception, 
>tampering, unauthorized amendment and viruses. We only send and receive 
>emails on the basis that we are not liable for any such corruption, 
>interception, tampering, amendment or viruses or any consequence thereof.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]

--------------------------
Larry Young
The Dalmatian Group
www.dalmatian.com 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-----------------------------------------
This email may contain confidential and privileged material for the sole use of the 
intended recipient(s). Any review, use, retention, distribution or disclosure by 
others is strictly prohibited. If you are not the intended recipient (or authorized to 
receive for the recipient), please contact the sender by reply email and delete all 
copies of this message.  Also, email is susceptible to data corruption, interception, 
tampering, unauthorized amendment and viruses. We only send and receive emails on the 
basis that we are not liable for any such corruption, interception, tampering, 
amendment or viruses or any consequence thereof.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to