I forgot to includethis in my last mail.

This is what I have today:
       <appender name="Protocol_P1" type="WebHandlerRollingFileAppender"/>

       <logger name="Protocol_P1_Receiver">
           <appender-ref ref="Protocol_P1"/>
       </logger>

       <logger name="Protocol_P1_Handler">
           <appender-ref ref="Protocol_P1"/>
       </logger>


Here I reference two loggers to the appender. What I need to do is to reference a NDC contexts (Protocol_P1_Receiver and Protocol_P1_Handler) to the Protocol_P1 appender.

- Morten

Ron Grabowski wrote:
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 <[EMAIL PROTECTED]> wrote:

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

- Morten

Reply via email to