Logging Category in Event Viewer

Topics: Logging Application Block
May 21, 2007 at 11:16 PM
Hi All,

How do i add something to the category column as seen in the Event Viewer? The category column always displays as None. I have used the follwoing code

LogEntry entry = new LogEntry(builder.ToString(), category, 0, eventId, System.Diagnostics.TraceEventType.Critical, "Critical Error", null);

Thank you for any help
May 23, 2007 at 2:05 PM
The category field in the Event Viewer is not populated based on log messages sent to it. The information to drive it is in the Registry and not within scope of the Logging Application Block. You would have to manually configure the Registry Settings yourself. I recommend doing a search in the search engines or MSDN to find out how to manipulate the categories as displayed in Event Viewer.




David Hayden
Microsoft MVP C#
May 23, 2007 at 6:57 PM
Thanks Dave for the information.