Is enterprise library logs exception detail in separate thread to improve the performance of application

Topics: Building and extending application blocks, Exception Handling Application Block, Logging Application Block
Dec 23, 2011 at 2:11 PM

I have 3.5 website with exception logging done into database by using enterprise library 4.1.

Does Ent. Library automatically create seprate thread(s) to improve the exception logging performance?

If not how can I create separate thread to log exception into DB in separate thread.



Subodh  Patil

+91 9923204180

Dec 23, 2011 at 11:05 PM

No, Enterprise Library does not automatically log on a separate thread.  

You could do it yourself:

ThreadPool.QueueUserWorkItem((o) => Logger.Write("Test", "General"));

Or wrap it in a method:

public static class MyLogger
    public static void Write(string message, string category)
        ThreadPool.QueueUserWorkItem((o) => Logger.Write(message, category));
MyLogger.Write("Test", "General");


Randy Levy
Enterprise Library support engineer