MS
This commit is contained in:
@@ -9,7 +9,7 @@ Public Class ClassLogger
|
||||
' eine Art Konstruktor
|
||||
Public Shared Sub Init(ByVal speicherort As String, Optional ByVal prefix As String = "", Optional ByVal appendFile As Boolean = True)
|
||||
' initialisiert den Speicherort
|
||||
ClassLogger.SetSpeicherort(speicherort)
|
||||
ClassLogger.SetSpeicherort()
|
||||
' wenn ein Prfix gesetzt wurde
|
||||
If Not prefix = "" Then
|
||||
' initialisiert das Prefix
|
||||
@@ -38,18 +38,12 @@ Public Class ClassLogger
|
||||
End Sub
|
||||
|
||||
' legt den Speicherort fest
|
||||
Public Shared Sub SetSpeicherort(ByVal speicherort As String)
|
||||
Dim f As String = Application.UserAppDataPath() & "\Log"
|
||||
|
||||
If speicherort = "" Then
|
||||
If IO.Directory.Exists(f) = False Then
|
||||
IO.Directory.CreateDirectory(f)
|
||||
End If
|
||||
ClassLogger.DateiSpeicherort = f
|
||||
Else
|
||||
ClassLogger.DateiSpeicherort = speicherort
|
||||
Public Shared Sub SetSpeicherort()
|
||||
Dim f As New IO.DirectoryInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Digital Data\RecordOrganizer\Log"))
|
||||
If IO.Directory.Exists(f.ToString) = False Then
|
||||
IO.Directory.CreateDirectory(f.ToString)
|
||||
End If
|
||||
|
||||
ClassLogger.DateiSpeicherort = f.ToString
|
||||
End Sub
|
||||
|
||||
' legt das Prefix für den Dateinamen fest
|
||||
|
||||
Reference in New Issue
Block a user