Event Log on Server 2008


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?


Colbert Zhou [MSFT]

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question