Files
MTSC/MTSC.UnitTests/ConsoleLogger.cs
T
2021-10-01 17:25:32 +02:00

25 lines
629 B
C#

using System;
using Microsoft.Extensions.Logging;
namespace MTSC.UnitTests
{
public sealed class ConsoleLogger : ILogger
{
public IDisposable BeginScope<TState>(TState state)
{
throw new NotImplementedException();
}
public bool IsEnabled(LogLevel logLevel)
{
return true;
}
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
{
var message = formatter(state, exception);
Console.WriteLine(message);
}
}
}