tags:

views:

500

answers:

2

Just like the title, I'm wondering if anyone has any experience using log4net in a multi-threaded environment like asp.net. We are currently using log4net and I want to make sure we won't run into any issues.

A: 

Give StackOverflow podcast #20 a listen. Jeff discusses his issues with Log4Net there.

rp

rp
A: 

We run log4net (and log4cxx) in highly multi-threaded environments without issue. You will want to be careful how you configure them though.

The issue with log4net that Jeff describes pertains to the use of a certain appender. We stick with simple log file appenders on the whole to reduce the impact of logging on the operation of the code. Writing a line to a file is pretty minimal, kicking off another database transaction is very heavy.

Rob Walker
So the database appender is what was giving Jeff the locking issues that he discussed in the podcast. Unfortunately we are using the database appender because we wanted a centralized log repository.
lfoulkrod