Extending the Eventlog part of the Logging Application Block

Topics: Building and extending application blocks, Logging Application Block
Nov 18, 2009 at 3:30 PM

Hi,

I'm new to the Enterprise Library and have a requirement to use the Logging Application Block for a project I'm working on.  I've been able to set it up to log out to the EventLog - but the log entries appearing there are missing key bits of data.

In Event Viewer, the catagory and  user fields are always unpopulated.  I can place catagory and user infomation into the log, but these only appear in the event's description field.

I believe I need to extend the logging application block and provide my own Custom Trace Listener - one that calls EventLog.WriteEntry() which more parameters that the default Listener.

 

Can someone please provide some pointers as to how to do this?

 

(I'm using the EntLib 4.1 release if it helps)

Nov 19, 2009 at 12:57 AM

You may want to read these first:

http://stackoverflow.com/questions/147307/net-how-to-set-user-information-in-an-eventlog-entry

http://bytes.com/topic/asp-net/answers/474644-windows-eventlog-populating-user-field

 

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