Shally,

In your configuration for the AdoNetAppender, do you have ReconnectOnError set 
to true? It defaults to false and is not in the example configuration.

http://logging.apache.org/log4net/release/sdk/log4net.Appender.AdoNetAppender.ReconnectOnError.html

If not, add the following line to the appender and see if it helps.

<reconnectOnError value="true">

Hope this works for you,

Rob Prouse

From: shally chong [mailto:shally.ch...@gmail.com]
Sent: Wednesday, July 28, 2010 1:52 AM
To: log4net-user@logging.apache.org
Subject: Fwd: ADONetAppender not logging


Hi,

I encountered a problem with ADONetAppender in production server after the DC 
perform restart for that server.
I have a .net c# window application where it will do some data loading into 
mysql server. After the data loading completed or any exception thrown during 
the data loading process, log4net will capture the error and store into mysql 
table as well. There will be no file loading from 2am - 6am, where during this 
time, there will be no log captured into mysql. Initially, after the file 
loaded into server at 6am, the log4net will start capturing log again. All 
these while, the log4net is able to capture log after the data loading process 
resume. But after the server being restarted, there is no more log captured 
into mysql after data loading process resume. And I have to manually restart 
the window services (the window application running as window services) daily 
to obtain the log again.
I've tried to modify the log4net to capture log into flat file, and it's 
working fine (all logs are captured after data loading process resume).

Please take note that the data loading process is working fine and data are 
inserted into mysql server correctly. The only not working is ADONetAppender is 
not capturing any logs after data loading process resume.

Please advise.

Thanks,
Shally

Reply via email to