title: log4net with MinimalLock locking model not working when setting file name programmatically
body: <p>When dynamically setting the log file name, the <code>RollingFileAppender</code> used with the <code>log4net.Appender.FileAppender+MinimalLock</code> locking model
  does not seem to log anything to the file.  However, when using the appender without this locking model, logging works.</p>
  
  <p>In the config file below, <code>Appender1</code> works, but <code>Appender2</code> does not:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,Log4net"/&gt;
    &lt;/configSections&gt;
  
    &lt;log4net&gt;
      &lt;appender name="Appender2"
      type="log4net.Appender.RollingFileAppender" &gt;
        &lt;file type="log4net.Util.PatternString" value="%property{LogName}" /&gt;
        &lt;encoding value="utf-8" /&gt;
        &lt;appendToFile value="true" /&gt;
        &lt;rollingStyle value="Size" /&gt;
        &lt;maxSizeRollBackups value="10" /&gt;
        &lt;maximumFileSize value="10000KB" /&gt;
        &lt;staticLogFileName value="true" /&gt;
        &lt;layout type="log4net.Layout.PatternLayout"&gt;
          &lt;conversionPattern value="[%logger] %message%n" /&gt;
        &lt;/layout&gt;
        &lt;lockingModel type="log4net.Appender.FileAppender+MinimalLock" /&gt;
      &lt;/appender&gt;
      &lt;appender name="Appender1"
      type="log4net.Appender.RollingFileAppender" &gt;
        &lt;file type="log4net.Util.PatternString" value="%property{LogName}" /&gt;
        &lt;encoding value="utf-8" /&gt;
        &lt;appendToFile value="true" /&gt;
        &lt;rollingStyle value="Size" /&gt;
        &lt;maxSizeRollBackups value="10" /&gt;
        &lt;maximumFileSize value="10000KB" /&gt;
        &lt;staticLogFileName value="true" /&gt;
        &lt;layout type="log4net.Layout.PatternLayout"&gt;
          &lt;conversionPattern value="%message%n" /&gt;
        &lt;/layout&gt;
      &lt;/appender&gt;
      &lt;logger name="myLogger" additivity="false"&gt;
        &lt;level value="DEBUG" /&gt;
        &lt;appender-ref ref="Appender2" /&gt;
      &lt;/logger&gt;
      &lt;root&gt;
        &lt;level value="DEBUG" /&gt;
        &lt;appender-ref ref="Appender1" /&gt;
      &lt;/root&gt;
    &lt;/log4net&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Here is the sample code I am testing:</p>
  
  <pre><code>static void Main(string[] args)
  {
      ILog logger = LogManager.GetLogger("myLogger");
      GlobalContext.Properties["LogName"] = "Log1.log"; // &lt;== The log file name is getting set here.  
      log4net.Config.XmlConfigurator.Configure(new FileInfo(@"Logger.config"));
  
      logger.Info("Sample log entry");
  }
  </code></pre>
  
  <p>Another observation I made is that if I remove the root level logger, logging seems to work.</p>