logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hadley Willan <HWil...@bunnings.com.au>
Subject RE: AdoNetAppender connection timeouts
Date Mon, 17 Nov 2008 00:16:46 GMT
Thanks for getting back to me Ron.

 

Okay, that's good news, that it'll try and reopen the connection.

 

We tend to use buffer size of 0 to avoid any build up, so I'm not sure
I'd gain anything by using the Rhino-tools logging, but thanks for
bringing it to my attention.

 

Regards

Hadley

 

________________________________

From: Ron Grabowski [mailto:rongrabowski@yahoo.com] 
Sent: Monday, 17 November 2008 00:55
To: Log4NET User
Subject: Re: AdoNetAppender connection timeouts

 

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...");
 InitializeDatabaseConnection();
 InitializeDatabaseCommand();
}

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

https://rhino-tools.svn.sourceforge.net/svnroot/rhino-tools/trunk/rhino-
commons/Rhino.Commons/Logging/AsyncBulkInsertAppender.cs

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 connections?

 

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.

Hadley

 

 

 

 

 


************************************************************************
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.
************************************************************************


************************************************************************
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.
************************************************************************
Mime
View raw message