System.Diagnostics.EventLog.CreateEventSource

  • Thread starter Thread starter Hayato Iriumi
  • Start date Start date
H

Hayato Iriumi

I have a problem with creating event source. When I try to create a event
source I get the following error.

System.ArgumentException: Only the first eight characters of custom log name
are significant, and there is already another log on the system using the
first eight characters of the name given.

The exception message is very descriptive and I understand it, BUT is there
any way Windows can just create event logs source as long as they are
unique?
 
Dim myLog as EventLog("myLog")
if myLog.SourceExists then
myLog.CreateSource("myLog")
End if
myLog.Source="myLog"
myLog.Write("Whatever")

I hope the syntax is right because I don't remember the exact
prop/method names. If you use VS.Net, it won't be much of a problem in
getting the syntax right.

with regards,


J.V.Ravichandran
- http://www.geocities.com/
jvravichandran
- http://www.411asp.net/func/search?
qry=Ravichandran+J.V.&cob=aspnetpro
- http://www.southasianoutlook.com
- http://www.MSDNAA.Net
- http://www.csharphelp.com
- http://www.poetry.com/Publications/
display.asp?ID=P3966388&BN=999&PN=2
- Or, just search on "J.V.Ravichandran"
at http://www.Google.com
 
I don't think you read my message right. I know how to create event log
source and all, but I was talking about the first 8 characters
significance.
 
Back
Top