Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi friends,

I'v written some code to generate an error log file using VBRUN.LogEventTypeConstants in VB6 like below:

 
...
' Add the message type as a string
Select Case nType
   Case vbLogEventTypeInformation
       sLogText = sLogText & "Info - "
   Case vbLogEventTypeWarning
       sLogText = sLogText & "Warning - "
   Case vbLogEventTypeError
       sLogText = sLogText & "Error - "
   Case Else
       sLogText = sLogText & "Unknown - "
End Select
...

 

The results will like these:

-----------------------------------------------------------

2004-03-30 10:42:45 Error Log (1.0.1), Info - Program started

2004-03-30 10:43:28 Error Log (1.0.1), Info - Enter: TestLevel1

...

2004-03-30 10:43:28 Error Log (1.0.1), Error - (62) Input past end of file

2004-03-30 10:43:28 Error Log (1.0.1), Info - Routine call stack:

2004-03-30 10:43:28 Error Log (1.0.1), Info - TestLevel1

...

2004-03-30 10:43:28 Error Log (1.0.1), Info - Exit: TestLevel1

-----------------------------------------------------------

 

Now I can't find such enumerations to follow.

Is there anyway to do with the same functionality in VB.NET? :confused:

 

Thanks!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...