using Microsoft.Extensions.Logging; class ConsoleLogger : ILogger { public IDisposable BeginScope(TState state) where TState : notnull { return null; } public bool IsEnabled(LogLevel logLevel) { return true; } public void Log(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func formatter) { Console.WriteLine(formatter(state, exception)); } }