I am writing a windows service in MS Visual Studio 2012.
I used:
private const string SERVICE_NAME = "Minifilter Windows Service";
private const string LOG_TYPE = "Application";
public EventLog elMinifilter = new EventLog(SERVICE_NAME);// remove STATIC
this.AutoLog = false;// UPDATE
elMinifilter.Source = SERVICE_NAME;
elMinifilter.Log = LOG_TYPE;
if (!EventLog.SourceExists(elMinifilter.Source))
EventLog.CreateEventSource(elMinifilter.Source, elMinifilter.Log);
// Write log
elMinifilter.WriteEntry("Start!", EventLogEntryType.Information);
At Computer Management >> System Tools >> Event viewer >> Application and Service Logs, I couldn't find the event log which I created. Is it right?
Where can I find event log of windows service?
Thanks all!!!