refactor: move Logging to GSS2.Core

This commit is contained in:
2026-02-04 07:31:56 +03:00
parent 99ebb79e0f
commit 201c67d46e
6 changed files with 13 additions and 7 deletions
+19
View File
@@ -0,0 +1,19 @@
using Microsoft.Extensions.Logging;
namespace GSS2.Core.Logging;
public sealed class FileLoggerProvider : ILoggerProvider
{
private readonly string _filePath;
public FileLoggerProvider(string filePath, bool append = true)
{
_filePath = filePath;
if (!append && File.Exists(filePath))
File.Create(filePath);
}
public ILogger CreateLogger(string categoryName) => new FileLogger(categoryName, _filePath);
public void Dispose() { }
}