From afb2f1f65847c7206705f4ac1fba66940b2c624b Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Wed, 30 Jan 2019 14:39:55 +0100 Subject: [PATCH] jj: Logging Version 0.0.6 - Add Log Directory for appdata path --- Modules.Logging/LogConfig.vb | 3 +-- Modules.Logging/My Project/AssemblyInfo.vb | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Modules.Logging/LogConfig.vb b/Modules.Logging/LogConfig.vb index 9faa6422..45c17238 100644 --- a/Modules.Logging/LogConfig.vb +++ b/Modules.Logging/LogConfig.vb @@ -173,7 +173,6 @@ Public Class LogConfig basePath = Path.Combine(appDataDir, companyName, productName, FOLDER_NAME_LOG) ElseIf logPath = PathType.CurrentDirectory Then Dim currentDirectory As String = My.Application.Info.DirectoryPath - basePath = Path.Combine(currentDirectory, FOLDER_NAME_LOG) Else 'Custom Path basePath = customLogPath @@ -197,7 +196,7 @@ Public Class LogConfig End Using File.Delete(fileAccessPath) - Catch ex As UnauthorizedAccessException + Catch ex As Exception ' If creation fails, use failSafe path basePath = failSafePath End Try diff --git a/Modules.Logging/My Project/AssemblyInfo.vb b/Modules.Logging/My Project/AssemblyInfo.vb index 8dccce0d..f90d3a43 100644 --- a/Modules.Logging/My Project/AssemblyInfo.vb +++ b/Modules.Logging/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - +