Event Log on Server 2008

  • Thread starter Thread starter Tom Bean
  • Start date Start date
T

Tom Bean

I have a Windows service that has been running for several years under
server 2003 that calls System.Diagnostics.EventLog.CreateEventSource() to
create a custom event log for the service.

When the service was installed on server 2008, the custom event log did not
show up until we manually created a "Custom View" for the custom event log.

How can I create the "Custom View" at the time the custom event log is
created to prevent having to create it manually?

Thanks,
Tom
 
Hello Tom,

By default, if we call EventLog.CreateEventSource(string sourceName, string
logName), the Log will appear in the Windows Server 2008 event viewer tool.
It is under "Applications and Services Logs" section. And the log appears
as the logName we specify in the second parameter. (Note, if the event
viewer is already opened, we need to close and restart it to see the new
created log). Creating a custom view is just doing a filter task to list
all entries by log or source category. It is not necessary.


Best regards,
Ji Zhou
Managed Newsgroup Support Team
 
Back
Top