From 81e0080a629aeead967128aed7f47c86c23b7a72 Mon Sep 17 00:00:00 2001 From: glax Date: Sat, 10 Feb 2024 20:42:35 +0100 Subject: [PATCH] Logs-folder --- GlaxLogger/GlaxLogger.csproj | 2 +- GlaxLogger/Logger.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/GlaxLogger/GlaxLogger.csproj b/GlaxLogger/GlaxLogger.csproj index 1d43d68..b8dfc0e 100644 --- a/GlaxLogger/GlaxLogger.csproj +++ b/GlaxLogger/GlaxLogger.csproj @@ -7,7 +7,7 @@ Glax https://git.bernloehr.eu/glax/GlaxLogger git - 1.0.4 + 1.0.5 diff --git a/GlaxLogger/Logger.cs b/GlaxLogger/Logger.cs index 8c6826f..3290387 100644 --- a/GlaxLogger/Logger.cs +++ b/GlaxLogger/Logger.cs @@ -14,7 +14,7 @@ public class Logger : ILogger, IDisposable, IAsyncDisposable public Logger(LogLevel filteredLevel = LogLevel.Warning, string? outputFolderPath = null, TextWriter? consoleOut = null) { this._filterLevel = filteredLevel; - string logFolderPath = outputFolderPath ?? Environment.CurrentDirectory; + string logFolderPath = outputFolderPath ?? Path.Join(Environment.CurrentDirectory, "logs"); this._filteredLogfile = new FileStream(Path.Join(logFolderPath, $"{DateTime.Now:yyyy-MM-dd HH.mm.ss}-filtered.log"), FileMode.Create); this._allMessageLogfile = new FileStream(Path.Join(logFolderPath, $"{DateTime.Now:yyyy-MM-dd HH.mm.ss}.log"), FileMode.Create); this._consoleOut = consoleOut ?? Console.Out;