title: Why am I logging to the wrong file?
body: <p>I have a program that will simulate the behavior of three cranes.  I want each crane to have its own log file.  For this question, we'll only worry about one of them.  The program will also have a separate, general-purpose log file.  I am planning to use the root logger as the general-purpose file.  The cranes will have named loggers, "Crane1" in this case.  </p>
  
  <p>The Crane1 log configuration uses additivity=false to ensure that it does not inherit anything from the root.  I want to be able to configure the root and the crane log files independently from each other.</p>
  
  <p>My program gets the logger named "Crane1" and writes messages.  However, the messages are going to the RollingFile appender and are appearing in the wrong file.  They are not getting handled by the TimedRollingAppender appender.  The TimedRollingAppender's file, PlantGenieTimed.log, is getting created, but it is empty.</p>
  
  <p>Why is Crane1 not using the appender I expect it to? </p>
  
  <p>(I used the silly name for the RollingFile appender's file to make sure that my program was reading the correct configuration file.)</p>
  
  <p>Thanks very much for your help.</p>
  
  <p>Configuration file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;log4net&gt;
    &lt;appender name="RollingFile" type="log4net.Appender.RollingFileAppender"&gt;
      &lt;file value="PlantGenie_ThisIsTheWrongFile.log" /&gt;
      &lt;appendToFile value="true" /&gt;
      &lt;maxSizeRollBackups value="90" /&gt;
      &lt;rollingStyle value="Size" /&gt;
  
      &lt;layout type="log4net.Layout.PatternLayout"&gt;
        &lt;conversionPattern value="%date - %message%newline" /&gt;
      &lt;/layout&gt;
    &lt;/appender&gt;
  
    &lt;appender name="TimedRollingAppender" type="log4net.Appender.RollingFileAppender"&gt;
      &lt;file value="PlantGenieTimed.log" /&gt;
      &lt;appendToFile value="true" /&gt;
      &lt;maxSizeRollBackups value="90" /&gt;
      &lt;rollingStyle value="Size" /&gt;
  
      &lt;layout type="log4net.Layout.PatternLayout"&gt;
        &lt;conversionPattern value="%date - %message%newline" /&gt;
      &lt;/layout&gt;
    &lt;/appender&gt;
  
    &lt;logger Name="Crane1" additivity="false"&gt;
      &lt;appender-ref ref="TimedRollingAppender" /&gt;
      &lt;level value="DEBUG"/&gt;
    &lt;/logger&gt;
  
    &lt;root&gt;
          &lt;level value="DEBUG" /&gt;
      &lt;appender-ref ref="RollingFile" /&gt;
    &lt;/root&gt;
  
  &lt;/log4net&gt;
  </code></pre>