From c2e4596f03d1d009acd88a638894047dbd11886c Mon Sep 17 00:00:00 2001 From: JenneJ Date: Wed, 29 Jul 2015 13:26:07 +0200 Subject: [PATCH] =?UTF-8?q?logger=20pfad=20ge=C3=A4ndert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Global_Indexer/ClassLogger.vb | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Global_Indexer/ClassLogger.vb b/Global_Indexer/ClassLogger.vb index 7a06ac7..cfe2772 100644 --- a/Global_Indexer/ClassLogger.vb +++ b/Global_Indexer/ClassLogger.vb @@ -45,15 +45,26 @@ Public Class ClassLogger ' legt den Speicherort fest Public Shared Sub SetSpeicherort(ByVal speicherort As String) - Dim f As New IO.DirectoryInfo(My.Application.Info.DirectoryPath & "\Log") + Dim f As New IO.DirectoryInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Digital Data\Global Indexer\Log")) + If speicherort = "" Then If f.Exists = False Then - IO.Directory.CreateDirectory(My.Application.Info.DirectoryPath & "\Log") + IO.Directory.CreateDirectory(f.ToString()) End If - ClassLogger.DateiSpeicherort = My.Application.Info.DirectoryPath & "\Log\" + ClassLogger.DateiSpeicherort = f.ToString() Else ClassLogger.DateiSpeicherort = speicherort End If + + 'Dim f As New IO.DirectoryInfo(My.Application.Info.DirectoryPath & "\Log") + 'If speicherort = "" Then + ' If f.Exists = False Then + ' IO.Directory.CreateDirectory(My.Application.Info.DirectoryPath & "\Log") + ' End If + ' ClassLogger.DateiSpeicherort = My.Application.Info.DirectoryPath & "\Log\" + 'Else + ' ClassLogger.DateiSpeicherort = speicherort + 'End If End Sub ' legt das Prefix für den Dateinamen fest