Log Concurrency problems??

Topics: Logging Application Block
Mar 12, 2008 at 5:54 PM
Hello everybody, I am going to use the Logging Application Block to log my web app (want to write to a file), and before I start, I would like to know if I will have to deal with concurrency issues or the block deals with them by itself.

Sorry for my english, hope I explained right myself.

Thanks in advance!!
Mar 25, 2008 at 9:03 PM
It handles the contention in a single process just fine. If you have multiple processes hitting it like an ASP.NET application and a WCF service running in a different application pool the first process will lock the file, the second will generate a new log file stamped with a GUID.

To avoid this some have wrapped the logger and exposed it through a WCF service so that it always runs in its own process out of the applications process.