PC Review


Reply
Thread Tools Rate Thread

EventLog.WriteEntry

 
 
Bernard
Guest
Posts: n/a
 
      25th Nov 2004
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
 
Reply With Quote
 
 
 
 
Joyjit Mukherjee
Guest
Posts: n/a
 
      25th Nov 2004
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

"Bernard" <(E-Mail Removed)> wrote in message
news:1cbf01c4d2b4$ea96bcb0$(E-Mail Removed)...
> 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



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
EventLog.WriteEntry working in 2.0 but not 1.1.4322 jameskmin@gmail.com Microsoft Dot NET Framework 0 19th Jul 2006 07:46 PM
EventLog.WriteEntry John Lee Microsoft C# .NET 3 19th Apr 2005 09:16 AM
eventlog.writeentry method Colin Halliday Microsoft Dot NET Framework 4 19th Nov 2004 12:15 AM
EventLog.WriteEntry Method Colin Halliday Microsoft VB .NET 0 18th Nov 2004 05:57 AM
EventLog.WriteEntry Limits: A.M Microsoft Dot NET Framework 3 14th Jun 2004 05:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:33 AM.