EventLog.WriteEntry

  • Thread starter Thread starter Bernard
  • Start date Start date
B

Bernard

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
 
Hi,

I think when an entery is created in the log from some other server that had
services running in your machine, the user field is populated.

Thanks
Joyjit
 
Back
Top