logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Grabowski <rongrabow...@yahoo.com>
Subject Re: AdoNetAppender connection timeouts
Date Sun, 16 Nov 2008 15:54:43 GMT
The AdoNetAppender keeps a reference to an open connection. At some point it ensures the connection
is open:

// shortened somewhat...the actual code is longer
if (m_reconnectOnError && m_dbConnection.State != ConnectionState.Open)
 LogLog.Debug("Attempting to reconnect to database...");

The AdoNetAppender is not async by default. If you're on SqlServer I'd recommend taking a
look at an appender that Ayende wrote:


whichs usess the SqlBulkCopy (very fast!) and background threads to write log messages to
the database. 

From: Hadley Willan <HWillan@bunnings.com.au>
To: log4net-user@logging.apache.org
Sent: Friday, November 14, 2008 1:56:40 AM
Subject: AdoNetAppender connection timeouts

Hi peoples,
How does the ADO.Net appender handle intermittent
I’m assuming that it’s holding a connection open
and appending?
I have <bufferSize value=”0”> set to
ensure an immediate call to a stored proc for logging.
So basically, do I need to worry about whether or not my
connection to the other end exists?
Could the lack of a network connection translate to a pause
in the app when the log statement gets written? 
Or is all logging an asynchronous thread that doesn’t affect
the caller?
Thanks in advance.
Bunnings Legal Disclaimer:

1)     This email is confidential and may contain legally privileged
information.  If you are not the intended recipient, you must not
disclose or use the information contained in it.  If you have received
this email in error, please notify us immediately by return email and
delete the document.

2)     All emails sent to and sent from Bunnings Group Limited.
are scanned for content.  Any material deemed to contain inappropriate
subject matter will be reported to the email administrator of all
parties concerned.

View raw message