Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top