title: How to send data to MSMQ queue using Log4Net?
body: <p>I am trying to send a message to MSMQ  queue using Log4Net.I spent lot of time to understand the functionality from the net. But I couldn't find much help. The following is my source code:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using log4net;
  using log4net.Config;
  
  namespace MQTest
  {
      class Program
      {   
      private static readonly ILog ilogger = LogManager.GetLogger("");
      static void Main(string[] args)
      {
          ilogger.Debug("This should go to the queue");
          ilogger.Fatal("This should go to the queue");
      }
      }
  }
  </code></pre>
  
  <p>app.config</p>
  
  <pre><code>&lt;log4net&gt;
  &lt;appender name="MsmqAppender" type="MQTest.Appender.MsmqAppender, MQTest"&gt;
  &lt;queueName value="private$\test_queue"/&gt;
  &lt;labelLayout value="LOG [%level] %date"/&gt;
  &lt;layout type="log4net.Layout.XmlLayoutSchemaLog4j"/&gt;
  &lt;/appender&gt;
  &lt;root&gt;
    &lt;level value="ALL"/&gt;
     &lt;appender-ref ref="MsmqAppender" /&gt;
  &lt;/root&gt;
  &lt;/log4net&gt;
  </code></pre>
  
  <p>When I debug the code, I have noticed that IsDebugEnabled = false, IsFatalEnabled =false etc.
   I don't know how to populate the above flags, while using MsmqAppender.</p>
  
  <p>Thanks for your help</p>