Custom Source Names

Topics: Logging Application Block
Nov 2, 2010 at 6:41 PM

Hi, 

I am trying to use entlib logging block. When we add a logging block by default, the listener  is windows event log. and the source here is "Enterprise Library Logging". When create a entry to the log, I can see it in the windows logs. 

But if I change the source to something like "test Entlib", I don't see any logs. But I see this new source type in the source types when I try to filter the log in management. 

Am I missing something here?

Nov 3, 2010 at 12:12 AM

You need to register the source to the event log:

EventLog.CreateEventSource("test Entlib", "Application");

See also this related FAQ item.

 

Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.
entlib.support@avanade.com
    

Nov 3, 2010 at 4:26 PM

I tried this. I deleted the Event Source and recreated it with the above method.

But I still don't see any log entries. If I change the source it works fine.

Nov 4, 2010 at 12:47 AM

Try configuring a flat file trace listener under the Logging Errors and Warnings section and attempt to log to the event log again.  The flat file trace listener should then have written a log entry indicating why logging to the event log failed.

 

Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.
entlib.support@avanade.com