If you have a narrow set of requirements for logging to your database
you may be better served by writing a custom appender.

For an example of how simple a database appender can be see:
http://marc.theaimsgroup.com/?l=log4net-user&m=111774673704586&w=2

The attachment is linked from the bottom of the page.

Cheers,

Nicko 

> -----Original Message-----
> From: Minh Tran [mailto:[EMAIL PROTECTED] 
> Sent: 02 June 2005 20:19
> To: Log4NET Dev
> Subject: ADONetAppender does not make use of connection pooling
> 
> Hi,
> 
> I am using version 1.2.9 BETA in an asp.net application.  
> I've been looking at the ADONetAppender class & it appears to 
> create a database connection upon instantiation & immediately 
> opens the connection to the database.  Even if the appender 
> never gets called on to log a message, it is consuming an 
> open database connection.  And it doesn't return the 
> connection to the connection pool after logging the buffered 
> messages to the database.  It only seems to return the 
> connection when the appender is closed.  Which won't occur 
> until the appdomain shuts down.  Every ADONetAppender creates 
> & maintains an open connection instead of drawing from the 
> pool.  If I have several ADONetAppenders in my ASP.Net 
> application, they end up holding database connections that 
> could be used to service other requests.  And when I start 
> adding multiple servers to the web farm that hosts my 
> application, the # of open connections reserved solely for 
> Log4Net will magnify.
> 
> I'd like to know if there is any on-going effort to address 
> database connection pooling?  Also, could a public property 
> be added to the AdoNetAppender to allow it to read the 
> connection string from appSettings?  Ie, :
> 
>     public string ConnectionStringAppSettings
>     {
>       set {m_connectionString =
> ConfigurationSettings.AppSettings[value];}
>     }
> 
> Regards,
> Minh Tran
> 
> 
> 

Reply via email to