logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joseph.r" <rajesh.jos...@gmail.com>
Subject Log4Net logs incorrect data
Date Fri, 01 Jun 2012 18:24:59 GMT

I have a WCF service where in I use Log4Net for logging information to Sql
Server database. I use Log4Net's GlobalContext to log some extra
information, like Transaction Name, Status, Message, and few other stuff.
Some of the important transactions within this system are Read, Write and

The log should look like:

"Read" -------- "Success" -------- "Read xxx customer data"
"Write" -------- "Success" -------- "Written xxx customer's data"
"Login" -------- "Failure" -------- "User session already exists."
Everything works fine when I run my normal tests - the logs are written to
the database perfectly. However, recently I did a load test by using JMeter.
The above mentioned three transactions were tested in 100 concurrent threads
for 3 minutes. When I checked the DB logs, I found that some of the
information were logged incorrectly.


"Read" -------- "Success" -------- "User session already exists."
"Write" -------- "Success" -------- "Read xxx customer data"
Is this an issue with Log4Net GlobalContext not being thread safe? I tried
using ThreadContext instead of GlobalContext, but looks like lots of
information were not logged.
View this message in context: http://old.nabble.com/Log4Net-logs-incorrect-data-tp33946524p33946524.html
Sent from the Log4net - Users mailing list archive at Nabble.com.

View raw message