title: Log4net not inserting data into table - neither shows any error
body: <p>I tried using log4net for logging info into db and I stuck with it now.Not sure what I am doing wrong.Whatever  message i send its not received in the database,neither shows any error</p>
  
  <p>I have a C# basic  WINForm application and I am trying to insert log into db. </p>
  
  <p>My log4net.xml below.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;log4net&gt;
    &lt;root&gt;
      &lt;level value="DEBUG" /&gt;
      &lt;appender-ref ref="ADONetAppender" /&gt;
    &lt;/root&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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /&gt;
      &lt;connectionString value="Data Source=CTI-OPT780-06\MSSQL2008; Initial Catalog=MYDB; Integrated Security = True;" /&gt;
      &lt;commandText value="INSERT INTO [Log] ([Date],[Thread],[Level],[Logger],[Message],[Exception]) VALUES (@log_date, @thread, @log_level, @logger, @message, @exception)" /&gt;
      &lt;parameter&gt;
        &lt;parameterName value="@log_date"/&gt;
        &lt;dbType value="DateTime"/&gt;
        &lt;layout type="log4net.Layout.RawTimeStampLayout"/&gt;
      &lt;/parameter&gt;
      &lt;parameter&gt;
        &lt;parameterName value="@thread"/&gt;
        &lt;dbType value="String"/&gt;
        &lt;size value="255"/&gt;
        &lt;layout type="log4net.Layout.PatternLayout"&gt;
          &lt;conversionPattern value="%thread"/&gt;
        &lt;/layout&gt;
      &lt;/parameter&gt;
      &lt;parameter&gt;
        &lt;parameterName value="@log_level"/&gt;
        &lt;dbType value="String"/&gt;
        &lt;size value="50"/&gt;
        &lt;layout type="log4net.Layout.PatternLayout"&gt;
          &lt;conversionPattern value="%level"/&gt;
        &lt;/layout&gt;
      &lt;/parameter&gt;
      &lt;parameter&gt;
        &lt;parameterName value="@logger"/&gt;
        &lt;dbType value="String"/&gt;
        &lt;size value="255"/&gt;
        &lt;layout type="log4net.Layout.PatternLayout"&gt;
          &lt;conversionPattern value="%logger"/&gt;
        &lt;/layout&gt;
      &lt;/parameter&gt;
      &lt;parameter&gt;
        &lt;parameterName value="@message"/&gt;
        &lt;dbType value="String"/&gt;
        &lt;size value="4000"/&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;parameter&gt;
        &lt;parameterName value="@context" /&gt;
        &lt;dbType value="String" /&gt;
        &lt;size value="512" /&gt;
        &lt;layout type="log4net.Layout.PatternLayout"&gt;
          &lt;conversionPattern value="%x" /&gt;
        &lt;/layout&gt;
      &lt;/parameter&gt;
    &lt;/appender&gt;
  &lt;/log4net&gt;
  </code></pre>
  
  <p>C# code to access it : </p>
  
  <pre><code>private ILog logger = LogManager.GetLogger(typeof(DBAccess));
  
  public TestDB()
  {
      logger.Debug("Here is a debug log.");
      logger.Info("... and an Info log.");
      logger.Warn("... and a warning.");
      logger.Error("... and an error.");
      logger.Fatal("... and a fatal error.");
  }
  </code></pre>
  
  <p>Create table for Log</p>
  
  <pre><code>CREATE TABLE [dbo].[Log]
  (
      [Id] [int] IDENTITY(1,1) NOT NULL,
      [Date] [datetime] NOT NULL,
      [Thread] [varchar](32) NOT NULL,
      [Context] [varchar](512) NULL,
      [Level] [varchar](512) NOT NULL,
      [Logger] [varchar](512) NOT NULL,
      [Message] [varchar](4000) NOT NULL,
      [Exception] [varchar](2000) NULL
  )
  </code></pre>
  
  <p>It would really great if someone points me where I m making mistake . Thanks </p>