I have log4net setup and configured to insert into a sql server 2005 table. My table is called Log. When I call the log4net method it does not enter any data into the log da
I don't really have any insight to your problem just by looking at your configuration, but you might try adding this to your app settings to see if log4net can tell you what is going wrong:
<appSettings>
<add key="log4net.Internal.Debug" value="true"/>
</appSettings>
See the section titled "How do I enable log4net internal debugging?" for a description of how to capture log4net's internal logging.
I had the same problem. In my case, I had to remove the use of [Exception] and @exception from the insert.
So, I had to change my logging too. I basically had to create a nice dump of my exception and pass that into the message parameter.
I hope this helps
Unless you specifically set a user in your connection string Log4Net will attempt to log with whatever user account is assigned to the process (ASP.NET worker process if that is the case). Log4Net also will not throw exceptions if you it is unable to log. You can turn on debugging to see what the issue is.
<bufferSize value="100" />
It is saying that it will keep 100 logs in memory until written into DB. Maybe that's why you don't see anything in DB?