21 lines
591 B
C#
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());
|
|||
|
}
|
|||
|
}
|
|||
|
}
|