Friday, February 27, 2015
log4net AdoNetAppender stops logging does not recover if database connection is lost database is down ReconnectOnError
How-I-fixed-it:
I found the right hints here:
https://www.mail-archive.com/log4net-user@logging.apache.org/msg04655.html
http://logging.apache.org/log4net/release/sdk/log4net.Appender.AdoNetAppender.ReconnectOnError.html
Add the tag:
to the log4net XML config file:
Keep in mind, that it then tries to reconnect to the database until the connect times out. This blocks the thread of the application!
You can add:
Connect Timeout=1 to the connectionString property to Limit the blocking to 1 second:
Labels:
adonetappender,
connection,
database,
does,
down,
if,
is,
log4net,
logging,
lost,
not,
reconnectonerror,
recover,
stops
Subscribe to:
Post Comments (Atom)


No comments:
Post a Comment