Cant write to event log

  • Thread starter Cory J. Laidlaw, Beyond01.com
  • 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
 
Z

zacks

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.
 
C

Cory J. Laidlaw, Beyond01.com

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top