You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
827 B

Module Globals
Public ofile As System.IO.File
Public oread As System.IO.StreamReader
Public Sub PrintOut(ByVal s As String)
'Console.WriteLine(Format(Now, "yyyyMMddHHmmss") + ": " + s)
PrintLog(Format(Now, "yyyyMMddHHmmss") + ": " + s, EventLogEntryType.Information)
End Sub
Dim EVLog As New EventLog("Log_EDKB19")
Public Sub PrintLog(ByVal message As String, Optional ByVal eventmessage As EventLogEntryType = EventLogEntryType.Information)
#If CONFIG = "Release" Then 'Release
If Not EventLog.SourceExists("EDKB19") Then
EventLog.CreateEventSource("EDKB19", "EDKB19 Log")
End If
EVLog.Source = "EDKB19 Log"
EventLog.WriteEntry(EVLog.Source, message, eventmessage)
#Else
Debug.Print(message)
#End If
End Sub
End Module