title: Using log4net to write to different loggers
body: <p>I am using log4net to do my logging.
  I would like it to write to a file and to the eventlog at the same time.</p>
  
  <p>For some reason, I find the messages twice in my logfile.</p>
  
  <p>This is my app.config-section :</p>
  
  <pre><code>&lt;log4net&gt;
      &lt;root&gt;
          &lt;level value="INFO" /&gt;
          &lt;appender-ref ref="LogFileAppender" /&gt;
          &lt;appender-ref ref="EventLogAppender" /&gt;
      &lt;/root&gt;
      &lt;appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender" &gt;
          &lt;param name="File" value="c:\temp\DIS-logfile.txt" /&gt;
          &lt;param name="AppendToFile" value="true" /&gt;
          &lt;rollingStyle value="Size" /&gt;
          &lt;maxSizeRollBackups value="10" /&gt;
          &lt;maximumFileSize value="10MB" /&gt;
          &lt;staticLogFileName value="true" /&gt;
          &lt;layout type="log4net.Layout.PatternLayout"&gt;
              &lt;param name="ConversionPattern" value="%date %-5level %logger - %message%newline" /&gt;
          &lt;/layout&gt;
      &lt;/appender&gt;
      &lt;appender name="EventLogAppender" type="log4net.Appender.EventLogAppender"&gt;
          &lt;param name="Indigo.DataIntakeService" value="eventlog" /&gt;
              &lt;layout type="log4net.Layout.PatternLayout"&gt;
                  &lt;conversionPattern value="%date %-5level %logger - %message%newline" /&gt;
              &lt;/layout&gt;
      &lt;/appender&gt;
  &lt;/log4net&gt;
  </code></pre>
  
  <p>In my code I have tof following :</p>
  
  <pre><code>private static readonly ILog Log = log4net.LogManager.GetLogger("DataIntakeService");
  private static readonly ILog LogEvents = log4net.LogManager.GetLogger("EventLogAppender");
  
  static void Main(string[] args)
  {
      log4net.Config.XmlConfigurator.Configure();
  }
  
  public static void LogInfo(string message)
  {
      Log.Info(message);
      LogEvents.Info(message);
  }
  </code></pre>
  
  <p>It writes to my log-file, as requested, but the messages should also go to my eventviewer and that doesn't happen. It writes those messages to the logfile as well.</p>
  
  <p>Where did I go wrong?</p>