This commit is contained in:
SchreiberM
2017-02-07 13:46:55 +01:00
parent e772d0cd57
commit acc6e2ebb3
9 changed files with 122 additions and 66 deletions

View File

@@ -1,4 +1,5 @@
Imports System.IO
Imports DD_LIB_Standards
Public Class ClassLogger
Public Shared DateiSpeicherort As String = Nothing
Public Shared DateiPrefix As String = ""
@@ -51,11 +52,16 @@ Public Class ClassLogger
ClassLogger.DateiPrefix = prefix
End Sub
Public Shared Sub Add(ByVal information As String, Optional ByVal ACHTUNG As Boolean = True)
Public Shared Sub Add(ByVal information As String, Optional ByVal ACHTUNG As Boolean = True, Optional ByVal Essential As Boolean = True)
If ClassLogger.OpenFile Then
Try
If ACHTUNG Then
ClassLogger.StreamWriter.WriteLine("#ATTENTION# (" & System.DateTime.Now & "): " & information)
If clsDatabase.DB_DEFAULT_INITIALIZED = True And USER_GUID > 0 And Essential = True Then
ClassHelper.InsertEssential_Log(USER_GUID, "USER-ID", information)
Else
ClassLogger.StreamWriter.WriteLine(String.Format("{0},{1},{2}", clsDatabase.DB_DEFAULT_INITIALIZED.ToString, USER_GUID.ToString, Essential.ToString))
End If
Else
ClassLogger.StreamWriter.WriteLine(information)
End If