The following code creates a Custom Log where you can write event to:
eventLog1 = new System.Diagnostics.EventLog();
if (!System.Diagnostics.EventLog.SourceExists("Transaction Service"))
{
System.Diagnostics.EventLog.CreateEventSource("Transaction Service",
"Transaction Log");
}
eventLog1.Source = "Transaction Service";
The following code actualy adds an event to the created log.
eventLog1.WriteEntry("MyWindowsService_CSharp Started",
EventLogEntryType.Information);