Scott,

I do not know about overriding priority but I do know how to correlate msgs with the 
active
thread. It is a bit of a hack but at the start of your service method use 
Thread.setName to
something unique and identifiable. Then the log can be easily parsed by thread name. 
Like I
said it seems to be a bit of a hack but I have used it for things like benchmarking 
with
success.

John

Scott M Stark wrote:

> I'm looking to correlate msgs with the active thread and to have the Priority of
> the thread override any Category.xxx() log msg invocation so that all log statements
> in this thread of control are rendered.
>
> The use case for this is a production J2EE server housing many EJBs, servlets, etc.
> and there is a problem report for particular user interacting with one servlet. I 
>don't
> want to have to crank up the priority limit to dump out all possible msgs. I just 
>want
> to toggle a request parameter that triggers logging throughout one particular thread 
>of
> control the user is interacting with.
>
> ----- Original Message -----
> From: "Christopher Taylor" <[EMAIL PROTECTED]>
> To: "LOG4J Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, February 16, 2001 6:27 PM
> Subject: Re: Using NDC to enable logging over a thread of control
>
> > Could you go into a little more detail?  Do you want to correlate messages with 
>Threads
> > or with clients?
> >
> > -Chris
> >
> > Scott M Stark wrote:
> >
> > > One common logging task I use frequently in server development is the ability to
> > > enable logging across a thread of control beginning at some entry point. An 
>example
> > > is enabling all log msgs regardless of priority that are executed within a 
>particular
> > > servlet's service() method. Going through the log4j api I can't see a way to do 
>this.
> > > Is this possible?
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to