Click here to Skip to main content
15,868,111 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm using Log4Net `AdoNetAppender` for my Web Application. Yes its working, but something is wrong.


for example My log table having two exception ,If i started the application and its logging one exception,meanwhile if i select the table,its not showing the third log, but I can able to see the third log after i stop running the website in IIS.

Please suggest me,how do i fix this?

What I have tried:

I referred this link
log-net-Tutorial
Posted
Updated 13-Mar-16 5:32am

1 solution

No, it doesn't.

The problem is probably buffering. The ADO.NET appender will not, by default, write each and every log item to the database as it gets them. It will buffer them and write them to the database in batches.

Read further down that article, under the FAQ section, and you'll find this:
Quote:
Why can't I get my ADO.NET appender to log anything? If you look over all of the settings and they look right, chances are that you are experiencing the pain of the bufferSize configuration. Change the bufferSize to 1 and it will attempt to log every message you send right away. If this still does not work, the issue is your configuration.
 
Share this answer
 
Comments
King Fisher 13-Mar-16 11:42am    
thanks,my buffer size was 10, its fine after i change the buffer size as 1.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900