[Solved] Configuring log4net to write on a database


You need to create the database and the Log table yourself.

If you want to diagnose possible issues with log4net, you can create a diagnostic trace by adding this to your .config file:

<system.diagnostics>
  <trace autoflush="true">
    <listeners>
      <add
        name="textWriterTraceListener"
        type="System.Diagnostics.TextWriterTraceListener"
        initializeData="C:\whatever\your\path\is\log4net.txt" />
    </listeners>
  </trace>
</system.diagnostics>

and adding the debug switch:

<appSettings>
  <add key="log4net.Internal.Debug" value="true"/>
</appSettings>

solved Configuring log4net to write on a database