title: When to use 'nested diagnostic context' (NDC)?
body: <p>Playing with log4net, I have seen the possibility to use a per-thread stack of context labels called the NDC. </p>
  
  <p>The labels pushed on this stack are displayed in a PatternLayout by specifying the <code>%x</code> or the <code>%ndc</code> format parameter.</p>
  
  <p>The usage is something like: </p>
  
  <pre><code>ILog log = log4net.LogManager.GetLogger(...) ;
  
  //pattern layout format: "[%ndc] - %message%newline"
  
  log.Info("message 1"); 
  using(log4net.NDC.Push("context")
  {
      using(log4net.NDC.Push("inner_context")
      {
        log.Info("message 2"); 
      }
      log.Info("message 3"); 
  }
  log.Info("message 4"); 
  </code></pre>
  
  <p>The output is something like:</p>
  
  <pre><code>null - message 1
  context inner_context - message 2
  context - message 3
  null - message 4
  </code></pre>
  
  <p>In your programming experience with log4net, when did you find this feature to be useful?</p>