0

I have log4net setup just like in the examples. In my config file, I have:

<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>

The appender configuration is setup just like it is shown on the log4net site for MS SQL Server surrounded by <log4net>. http://logging.apache.org/log4net/release/config-examples.html

In the AssemblyInfo.cs I have:

[assembly: log4net.Config.XmlConfigurator]

Yet, nothing is showing up in my [dbo].[Log] table.

I have tried using the trace debugging text file, but no errors show up there.

ScubaSteve
  • 7,724
  • 8
  • 52
  • 65

1 Answers1

0

The reason why no errors were showing up in the trace file is because no errors in log4net were happening.

The reason why there was nothing showing up in the [dbo].[Log] table was because the default config on the l4n site has <bufferSize value="100" />. It is my understanding that this bufferSize would mean that l4n would wait until there are 100 messages queued up before writing them to the database. So, to fix it for me, I just changed the value to "1".

ScubaSteve
  • 7,724
  • 8
  • 52
  • 65