title: How to write log4net config into appsettings.json?
body: <p>I have implemented <code>log4net</code> into <code>.NET core 2.0</code>, to log into a text file. As log4net have a config file, which is having <code>XML configuration</code> in it. So, I have created a separate file <code>log4net.config</code> to set its configuration and it is working fine. But I want to set its configuration into <code>appsettings.json</code>. Is it possible to write the log4net configuration into <code>appsettings.json</code>.</p>
  
  <pre><code>&lt;appSettings&gt;
      &lt;add key="IsLog" value="True" /&gt;
      &lt;add key="MaxThreads" value="3" /&gt;
    &lt;/appSettings&gt;
    &lt;log4net debug="false"&gt;
      &lt;root&gt;
        &lt;level value="ALL" /&gt;
        &lt;appender-ref ref="RollingLogFileAppender" /&gt;
      &lt;/root&gt;
   &lt;appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"&gt;
      &lt;file value="./logs/logfile.txt" /&gt;
      &lt;appendToFile value="false" /&gt;
      &lt;rollingStyle value="Size" /&gt;
      &lt;maxSizeRollBackups value="-1" /&gt;
      &lt;maximumFileSize value="50GB" /&gt;
      &lt;layout type="log4net.Layout.PatternLayout"&gt;
          &lt;conversionPattern value="%date [%thread] %-5level %logger - %message%newline" /&gt;
      &lt;/layout&gt;
  &lt;/appender&gt;   
    &lt;/log4net&gt;
  </code></pre>
  
  <p>this is my XML configuration.</p>
  
  <p>I have found this <a href="https://stackoverflow.com/questions/28846338/how-to-add-configuration-for-log4net-or-any-other-3rd-party-library-in-asp-net">question</a> in which it is mentioned that <code>log4net don't support Json projects</code>. Is it possible to write its configuration into <code>appsettings.json</code>.</p>