Cant write to event log

Cant write to event log

Post by Q29yeSBKLi » Sun, 23 Nov 2008 05:38:00


Hi,

I am trying to learn how to write key events to the application event log.

I create a new windows application (not ASP) and use the following code:

My.Application.Log.Wri *** try("Please show in the application log")

I get nothin'.... I am running Vista SP1 and using VS 2008 (VB.net 2008)

Thanks much!

Cory
 
 
 

Cant write to event log

Post by zack » Sun, 23 Nov 2008 06:23:56

On Nov 21, 3:38爌m, Cory J. Laidlaw, Beyond01.com


Apparently you do not have the Log's listener configured correctly.

Personally, I prefer to use an instance of the EventLog class in the
System.Diagnostics namespace to write to an event log.

 
 
 

Cant write to event log

Post by Ryan S. Th » Mon, 24 Nov 2008 02:25:15

Log Events show up in the Immediate Window
View->Other Windows ->Immediate
 
 
 

Cant write to event log

Post by Q29yeSBKLi » Sun, 30 Nov 2008 00:59:01

awesome! System.Diagnostics...WriteEvent works great! Thanks!!!