14 messages in org.apache.logging.log4j-userRe: Fw: ThreadLocalAppender for log4j...
FromSent OnAttachments
Ramakrishna MenonMar 1, 2004 5:25 pm 
Ceki GülcüMar 2, 2004 2:18 am 
Ramakrishna MenonMar 2, 2004 7:26 am 
Ceki GülcüMar 2, 2004 8:13 am 
Paul SmithMar 2, 2004 11:56 am 
Ramakrishna MenonMar 2, 2004 12:12 pm 
Paul SmithMar 2, 2004 1:22 pm 
Ramakrishna MenonMar 2, 2004 3:33 pm 
Paul SmithMar 2, 2004 3:42 pm 
Ramakrishna MenonMar 2, 2004 4:36 pm 
Ramakrishna MenonJun 23, 2004 9:11 am 
Ramakrishna MenonJun 25, 2004 9:44 am 
Paul SmithJun 27, 2004 2:53 pm 
Ramakrishna MenonJun 28, 2004 8:39 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Fw: ThreadLocalAppender for log4j? resendingActions...
From:Ramakrishna Menon (rama@oracle.com)
Date:Mar 2, 2004 4:36:42 pm
List:org.apache.logging.log4j-user

----- Original Message ----- From: "Paul Smith" <paul@lawlex.com.au> To: "Log4J Users List" <log4@logging.apache.org> Sent: Tuesday, March 02, 2004 3:42 PM Subject: Re: Fw: ThreadLocalAppender for log4j? resending

On Wed, 2004-03-03 at 10:33, Ramakrishna Menon wrote:

Paul Thanx a lot! my requirements: When a url is rendered, the entire rendering logic is done in a separate thread (assume one request = one separate thread). In the logic of rendering the url, we have log4j messages being logged. I want to transparently "trap" those messages so that I can dump them on the url page itself based on a flag that I specify in the url.

I would assume you mean "distinct" thread as opposed to "seperate" thread? IE. for a given web request, you are saying only 1 thread processes it. This is true 99% of the time unless your code calls on something else that involves other threads and some rendevouzing, but otherwise 99% of the time yes.

Not sure what the difference between "distinct" and "separate" here is:).. Anyways - yes that is waht I was implying about the request - We are assuming that we fall in the 99% case.

I think what your idea is to create one Appender per thread and then filter out the log4j messages for that thread, correct? That is an interesting one - I will get back on how it goes.

Yes, the appender in my example gets initialised with a Filter that only accepts LoggingEvents from the thread that created it.

Would be great to hear how you went with it.

Will let you know... Thanx!

cheers,