Falcon.SugarApi/Falcon.SugarApi.Test/TestLog.cs

21 lines
591 B
C#
Raw Normal View History

2022-03-21 12:05:12 +08:00
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());
}
}
}