EventLog.WriteEntry

From: Bernard (anonymous_at_discussions.microsoft.com)
Date: 11/25/04


Date: Wed, 24 Nov 2004 22:06:34 -0800

I created a custom event log and using the WriteEntry
method created an entry

<code>
EventLog.WriteEntry("SPR BackOffice","Some message"
logged on", EventLogEntryType.Information, 1001);
</code>

This all worked very well - however the User field in my
Custom Event Log was not populated - i.e. Going to the
Event Viewer and checking out the entry had all the data
including date and time. the only field not populated was
the User Field - it had N/A - was hoping for the logged
on user - no parameter to pass this through on WriteEntry
method



Relevant Pages

  • Re: EventLog.WriteEntry
    ... the user field is populated. ... > I created a custom event log and using the WriteEntry ... > Event Viewer and checking out the entry had all the data ... > on user - no parameter to pass this through on WriteEntry ...
    (microsoft.public.dotnet.framework)
  • Re: Error While Writing to CUSTOM EventLog
    ... The problem is on the first time the application writes to the EventLog with ... The easiest way is to manually add an entry to your registry at: ... > OK this just seems to be a common question being asked around here, ... > Key when trying to write to my custom event log. ...
    (microsoft.public.dotnet.framework.aspnet)