Logs-folder

This commit is contained in:
glax 2024-02-10 20:42:35 +01:00
parent 775b8e3a6a
commit 81e0080a62
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@
<Authors>Glax</Authors>
<RepositoryUrl>https://git.bernloehr.eu/glax/GlaxLogger</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Version>1.0.4</Version>
<Version>1.0.5</Version>
</PropertyGroup>
<ItemGroup>

View File

@ -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;