title: Log4Net in my .Net website on debugging always shows IsErrorEnabled value as FALSE
body: <p>I have been trying to log the error in my .Net website to the SQL database using Log4Net AdoNetAppender, but the error message are not getting logged in the database. Looks like the AdoNetAppender is not getting enabled or read. While debugging what I observed is that the Logger.Log shows all its properties values as false. i.e. IsErrorEnabled / IsDebugEnabled / IsFatalEnabled / IsInfoEnabled / IsWarnEnabled all as false. </p>
  
  <p><strong>Version of the log4net.dll I am using is 2.0.8.0</strong></p>
  
  <p><a href="https://i.stack.imgur.com/kXnqq.png" rel="nofollow noreferrer">click here to view image of object properties</a></p>
  
  <p>The logging.cs code is as below:</p>
  
  <pre><code>[assembly: log4net.Config.XmlConfigurator(Watch = true)]
  namespace Utility.Library
  {
      public class Logging
      {
  
          public static class Logger
          {
              public static ILog Log = LogManager.GetLogger(typeof(SharedMethods));
          }
  
          public static class LogException
          {
  
              private static StringBuilder sessionJobLogBuilder = new StringBuilder();
  
              public static void LogError(string sMsg, Exception ex)
              {
  
                  Logger.Log.Error(sMsg, ex);
                  sessionJobLogBuilder.AppendLine(sMsg + Environment.NewLine);
                  sessionJobLogBuilder.AppendLine(ex.ToString() + Environment.NewLine);
  
              }
  
              public static void LogInfo(string sMsg)
              {
                  Logger.Log.Info(sMsg);
                  sessionJobLogBuilder.AppendLine(sMsg + Environment.NewLine);
              }
  
          }
  
      }
  
  }
  </code></pre>
  
  <p>And below is the app.config:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><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="AdoNetAppender" type="log4net.Appender.AdoNetAppender"&gt;
        &lt;bufferSize value="1" /&gt;
        &lt;connectionType value="System.Data.SqlClient.SqlConnection, 
     System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /&gt;
        &lt;connectionString value="data source=xxx\xxx;
      initial catalog=xxx;integrated security=false;
      persist security info=True;User ID=xxx;Password=xxx" /&gt;
        &lt;commandText value="EXECUTE [dbo].[WriteLogEntry] @App, @Module, @Ver, @Computer, @UserID, @Level, @Message, @Exception" /&gt;
        &lt;parameter&gt;
          &lt;parameterName value="@App" /&gt;
          &lt;dbType value="String" /&gt;
          &lt;size value="30" /&gt;
          &lt;layout type="log4net.Layout.PatternLayout"&gt;
            &lt;conversionPattern value="%App" /&gt;
          &lt;/layout&gt;
        &lt;/parameter&gt;
        &lt;parameter&gt;
          &lt;parameterName value="@Module" /&gt;
          &lt;dbType value="String" /&gt;
          &lt;size value="200" /&gt;
          &lt;layout type="log4net.Layout.PatternLayout"&gt;
            &lt;conversionPattern value="%Module" /&gt;
          &lt;/layout&gt;
        &lt;/parameter&gt;
        &lt;parameter&gt;
          &lt;parameterName value="@Ver" /&gt;
          &lt;dbType value="String" /&gt;
          &lt;size value="20" /&gt;
          &lt;layout type="log4net.Layout.PatternLayout"&gt;
            &lt;conversionPattern value="%Ver" /&gt;
          &lt;/layout&gt;
        &lt;/parameter&gt;
        &lt;parameter&gt;
          &lt;parameterName value="@Computer" /&gt;
          &lt;dbType value="String" /&gt;
          &lt;size value="15" /&gt;
          &lt;layout type="log4net.Layout.PatternLayout"&gt;
            &lt;conversionPattern value="%Computer" /&gt;
          &lt;/layout&gt;
        &lt;/parameter&gt;
        &lt;parameter&gt;
          &lt;parameterName value="@UserID" /&gt;
          &lt;dbType value="String" /&gt;
          &lt;size value="30" /&gt;
          &lt;layout type="log4net.Layout.PatternLayout"&gt;
            &lt;conversionPattern value="%UserID" /&gt;
          &lt;/layout&gt;
        &lt;/parameter&gt;
        &lt;parameter&gt;
          &lt;parameterName value="@Level" /&gt;
          &lt;dbType value="Int32" /&gt;
          &lt;layout type="log4net.Layout.PatternLayout" /&gt;
        &lt;/parameter&gt;
        &lt;parameter&gt;
          &lt;parameterName value="@Message" /&gt;
          &lt;dbType value="String" /&gt;
          &lt;size value="2000" /&gt;
          &lt;layout type="log4net.Layout.PatternLayout"&gt;
            &lt;conversionPattern value="%Message" /&gt;
          &lt;/layout&gt;
        &lt;/parameter&gt;
        &lt;parameter&gt;
          &lt;parameterName value="@Exception" /&gt;
          &lt;dbType value="String" /&gt;
          &lt;size value="2000" /&gt;
          &lt;layout type="log4net.Layout.ExceptionLayout" /&gt;
        &lt;/parameter&gt;
      &lt;/appender&gt;
      &lt;root&gt;
        &lt;level value="ALL" /&gt;
        &lt;appender-ref ref="AdoNetAppender"/&gt;
      &lt;/root&gt;
    &lt;/log4net&gt;
  &lt;/configuration&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>But the Logger.Log properties at all levels show as false.</strong></p>