logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Parrish, Ken" <KParr...@gomez.com>
Subject Multi-threaded ASP.NET application not working ...
Date Tue, 13 Nov 2007 21:56:16 GMT
I am a long time log4net user, but apparently, I have tripped over a
scenario for which I cannot seem to find a solution:



Microsoft Visual Studio Version 2005

.NET Framework Version 2.0

log4net Version 1.2.10


I have a class library in an assembly which contains a data cache object
that is multithreaded.  It contains a simple worker thread that polls
for changes to the contents of the cache and updates accordingly.  It's
about as simple a multithreaded pattern as possible.  The class is
liberally instrumented with log4net logging statements.


If executed from a console application, logging works just fine
throughout the cache object / library.


If executed from an ASP.NET Web Application, logging statements executed
on the primary thread work correctly.  HOWEVER, logging statements
executed on the WORKER thread hang.  No output from logging statements
on the worker threads are generated.  The thread proc hangs when
attempting to call Log.Info.  If I comment out all logging statements
that would be executed by the worker thread, the application executes


I do mostly server and framework design, so the minutiae of ASP.NET
threading is not my strong suit.


Has anyone encountered similar behavior in an ASP.NET application?


Has anyone successfully used log4net inside a worker thread in an
ASP.NET application?  If so, I'd be interested in why it works for you.


Any other clues or suggestions would be most appreciated.


Thank you,


Ken Parrish

Gomez, Inc.

Lexington, MA



View raw message