title: Debugging an ADO log4net appender (that won't append)
body: <p>I've had this working before, but now it's not working and I've been tearing my hair out for the past two hours trying to figure it out.</p>
  
  <p>I have several appenders, where some are for a "main" log, and another is for another "task" log.  The main log has 4 appenders: console, memory, file, and DB (sqlite3).  The task log has 3 appenders: memory, file, and DB (also sqlite).</p>
  
  <p>What's driving me nuts is that all of the appenders <em>except for</em> the task log's DB appender work great.  There's nothing particularly special about the task DB appender, other than that I use the ThreadContext Properties to put task-specific data into the log.  And like I said, all of that data appears in the text file and memory buffer just fine.</p>
  
  <p>I've looked for errors in the output window related to the DB appender, and there aren't any.  I've compared both DB appenders in my configuration XML file, and they are identical... I even removed my custom properties from the mix, and the task DB appender <em>still</em> doesn't work!</p>
  
  <p>My task logger is configured like this:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;logger name="TaskLogger"&gt;
    &lt;level value="DEBUG" /&gt;
    &lt;appender-ref ref="TaskLogFile" /&gt;
    &lt;appender-ref ref="TaskLogDB" /&gt;
    &lt;appender-ref ref="TaskLogMemory" /&gt;
  &lt;/logger&gt;
  </code></pre>
  
  <p>My DB appender is configured like this:</p>
  
  <pre class="lang-xml prettyprint-override"><code>  &lt;appender name="TaskLogDB" type="log4net.Appender.AdoNetAppender"&gt;
      &lt;bufferSize value="100" /&gt;
      &lt;connectionType value="System.Data.SQLite.SQLiteConnection, System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" /&gt;
      &lt;connectionString value="Data Source=task_log.s3db;Version=3;" /&gt;
      &lt;commandText value="INSERT INTO TaskLog (Date, Level, Thread, Logger, Message, Exception) VALUES (@Date, @Level, @Thread, @Logger, @Message, @Exception)" /&gt;
      &lt;parameter&gt;
        &lt;parameterName value="@Date" /&gt;
        &lt;dbType value="DateTime" /&gt;
        &lt;layout type="log4net.Layout.RawTimeStampLayout" /&gt;
      &lt;/parameter&gt;
      &lt;parameter&gt;
        &lt;parameterName value="@Level" /&gt;
        &lt;dbType value="String" /&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;layout type="log4net.Layout.PatternLayout"&gt;
          &lt;conversionPattern value="%logger" /&gt;
        &lt;/layout&gt;
      &lt;/parameter&gt;
      &lt;parameter&gt;
        &lt;parameterName value="@Thread" /&gt;
        &lt;dbType value="String" /&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="@Message" /&gt;
        &lt;dbType value="String" /&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;layout type="log4net.Layout.PatternLayout"&gt;
          &lt;conversionPattern value="%exception" /&gt;
        &lt;/layout&gt;
      &lt;/parameter&gt;
    &lt;/appender&gt;
  </code></pre>
  
  <p>My main log DB appender is configured the same way, yet <em>it</em> works.  Can anyone recommend further debugging strategies?</p>