You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Simon Wallis <ma...@wallis.ca> on 2004/09/28 23:03:30 UTC

SQL Server appender help

Hi, I'm trying to get the SQL Server appender working for log4net. I have the log file appender working, but am having problems with SQL Server.

I traced through the log4net code and in ADONetAppender.cs (line 343 in my version, 1.2b8), there is this check:

if (m_dbConnection != null && m_dbConnection.State == ConnectionState.Open)

I found that the db connection is not null, but the state is CLOSED, not OPEN. Where should the connection get opened? Shouldn't this be taken care of by log4net?

Thanks,
Simon.