forked from amkovkov/GranuSightSoftware2
feat: GSS2.Test - UI+DI, Vulkan render test
This commit is contained in:
@@ -6,7 +6,12 @@ public sealed class FileLoggerProvider : ILoggerProvider
|
||||
{
|
||||
private readonly string _filePath;
|
||||
|
||||
public FileLoggerProvider(string filePath) => _filePath = 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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user