Falcon.SugarApi/Falcon.SugarApi.Test/TestLog.cs
2022-03-21 12:05:12 +08:00

21 lines
591 B
C#

using System;
using Microsoft.Extensions.Logging;
namespace Falcon.SugarApi.Test
{
/// <summary>
/// 测试用Logger实例
/// </summary>
public class TestLog : ILogger
{
public IDisposable BeginScope<TState>(TState state) {
throw new NotImplementedException();
}
public bool IsEnabled(LogLevel logLevel) => true;
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter) {
Console.WriteLine(state?.ToString());
}
}
}