logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Grabowski <rongrabow...@yahoo.com>
Subject Re: Question about NDC and appenders
Date Sat, 25 Mar 2006 00:46:15 GMT
I don't understand the question. By specific NDC context do you mean
you're using nested using() statements?

using(ThreadContext.Stacks["NDC"].Push("first push"))
{
 using(ThreadContext.Stacks["NDC"].Push("second push"))
 {
  log.Info("This log message has two NDC entires");
 }
 log.Info("This log message has one NDC entry");
}

--- Morten Andersen <morten@vianett.no> wrote:

> Can I configure log4net to route messages from a specific NDC context
> to 
> a appender?
> 
> - Morten
> 

Mime
View raw message