title: Get log4net log file in C#
body: <p>This is my configuration for log4net:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;log4net&gt;
      &lt;appender name="MyLogger" type="log4net.Appender.RollingFileAppender"&gt;
          &lt;file value="MyLog.log" /&gt;
          &lt;appendToFile value="true" /&gt; 
          &lt;rollingStyle value="Size"/&gt;
          &lt;maxSizeRollBackups value="20"/&gt;
          &lt;maximumFileSize value="1000KB"/&gt;
          &lt;layout type="log4net.Layout.PatternLayout"&gt;
              &lt;param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss},%p,%m%n" /&gt;
          &lt;/layout&gt;
      &lt;/appender&gt;
      &lt;root&gt;
          &lt;level value="DEBUG" /&gt;
          &lt;appender-ref ref="MyLogger" /&gt;
      &lt;/root&gt;
  &lt;/log4net&gt;
  </code></pre>
  
  <p>In C# I'm trying to get the name of the log file (which is MyLog.log). I googled and tried many things but failed to do so. Any help?</p>
  
  <p>Thanks!</p>