MS
This commit is contained in:
@@ -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 = ""
|
||||
@@ -39,13 +40,12 @@ Public Class ClassLogger
|
||||
|
||||
' legt den Speicherort fest
|
||||
Public Shared Sub SetSpeicherort(ByVal speicherort As String)
|
||||
Dim f As String = Application.UserAppDataPath() & "\Log"
|
||||
|
||||
Dim f As New IO.DirectoryInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Digital Data\RecordOrganizer-VersionCheck\Log"))
|
||||
If speicherort = "" Then
|
||||
If IO.Directory.Exists(f) = False Then
|
||||
IO.Directory.CreateDirectory(f)
|
||||
If IO.Directory.Exists(f.ToString) = False Then
|
||||
IO.Directory.CreateDirectory(f.ToString)
|
||||
End If
|
||||
ClassLogger.DateiSpeicherort = f
|
||||
ClassLogger.DateiSpeicherort = f.ToString
|
||||
Else
|
||||
ClassLogger.DateiSpeicherort = speicherort
|
||||
End If
|
||||
@@ -61,7 +61,9 @@ Public Class ClassLogger
|
||||
If ClassLogger.OpenFile Then
|
||||
Try
|
||||
If ACHTUNG Then
|
||||
ClassLogger.StreamWriter.WriteLine("#ATTENTION# (" & System.DateTime.Now & "): " & information)
|
||||
ClassLogger.StreamWriter.WriteLine("#ERROR# (" & System.DateTime.Now & "): " & information)
|
||||
ERROR_WHILE_UPDATING = True
|
||||
|
||||
Else
|
||||
ClassLogger.StreamWriter.WriteLine(information)
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user