MET08ANLYSDIFAAST230 - v4.43.0 - Use EDA multiple

This commit is contained in:
2022-05-16 15:34:24 -07:00
parent 9c042d3871
commit 2685dd79d5
178 changed files with 13498 additions and 11875 deletions

View File

@ -0,0 +1,26 @@
using Microsoft.Extensions.Logging;
using System.Collections.Concurrent;
namespace Adaptation._Tests.Shared.Log;
public class DebugProvider : ILoggerProvider
{
private readonly LogLevel _LogLevel;
private readonly ConcurrentDictionary<string, DebugLogger> _Loggers;
public DebugProvider(LogLevel logLevel)
{
_LogLevel = logLevel;
_Loggers = new ConcurrentDictionary<string, DebugLogger>();
}
public ILogger CreateLogger(string categoryName) => _Loggers.GetOrAdd(categoryName, name => new DebugLogger(_LogLevel, name));
public void Dispose()
{
_Loggers.Clear();
GC.SuppressFinalize(this);
}
}