Cannot log in another event log than the Windows Application logs

Topics: Logging Application Block
Dec 7, 2012 at 1:45 PM


I'm trying to use Logging Application Block. I've done the hands on lab and I can log in the Application event log, but now I want to log in another event log (specific to my application), which is in the Application and Services logs.

I try to change the Log Name in the Event Log Listener, but it has no effect, except when it's defined as "Application" or empty (I tried also with "Setup" ou "System" but in this case, nothing happens).

I'm working with Enterprise Library 5.0 and Visual Studio 2010

Thank's for any help


Dec 10, 2012 at 6:56 AM

Out of the box, Enterprise Library supports writing to Windows Logs (e.g. Application, or a custom log).  Application and Services logs are different (see: Technology Summary for Reading and Managing Event Logs) and are not supported in the current release. If you want to log to a custom Windows Log then you can do that by creating the log and the event sources and then configuring the logging block.  See How to: Create and Remove Custom Event Logs.

Randy Levy
Enterprise Library support engineer