StanONE Posted March 30, 2004 Posted March 30, 2004 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! Quote
Administrators PlausiblyDamp Posted March 30, 2004 Administrators Posted March 30, 2004 System.Diagnostics.EventLogEntryType Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.