mirror of
https://github.com/AlexMacocian/MTSC.git
synced 2026-07-15 14:59:33 +00:00
25 lines
629 B
C#
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);
|
|
}
|
|
}
|
|
}
|