Cant write to event log

  • Thread starter Thread starter Cory J. Laidlaw, Beyond01.com
  • Start date Start date
C

Cory J. Laidlaw, Beyond01.com

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.WriteEntry("Please show in the application log")

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

Thanks much!

Cory
 
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.WriteEntry("Please show in the application log")

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

Thanks much!

Cory

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.
 
Back
Top