|
Thanks Nicko. I'm calling shutdown, but seem to be getting some data loss when my ADOAppender has a buffer value greater then 1. I make sure to only call the shutdown once after the log.Error call. I'll try removing the shutdown call entirely. Marc Nicko Cadell wrote: Yes the AdoNetAppender will write buffered events to the database during Shutdown.When the log4net Shutdown method is called all the appenders are asked to Close. The Appenders based on the BufferingAppenderSkeleton, including the AdoNetAppender, will attempt to flush their buffers to their backing store. Log4net does register for the ProcessExit event and will call Shutdown when the application is exiting, however the runtime does not wait for the event handler to complete which may cause data loss. To ensure that the buffered events are delivered you should call the LogManager.Shutdown() method explicitly during your application shutdown. Nicko-----Original Message----- From: M. d'Entremont [mailto:[EMAIL PROTECTED]] Sent: 05 January 2005 23:12 To: Log4NET User Subject: shutdown and appender sync Am I correct in assuming shutdown asks all the appenders to sync with the data repositories, i.e. in the ADONetAppender I have the buffer size set to 50. If there are any messages to be log that are not yet written to the db the appender be asked to write them? Marc --
This electronic message transmission, including any attached files, contains information which may be confidential and/or privileged. The information is intended to be for the SOLE use of the individual or entity named above. If you are not the intended recipient, be aware that any review, disclosure, copying, distribution or use of the contents of this information is prohibited. This message is not to be forwarded for any reason without prior consent of the sender. If you have received this electronic transmission in error, please notify the sender immediately by telephone (250) 386-4266 or by a "reply to sender only" message and destroy all electronic and hard copies of the communication, including attachments, without reading or saving in any manner. |
<<inline: image001.jpg>>
