using Microsoft.Extensions.Logging; using System; using System.Text; namespace CryptoExchange.Net.UnitTests.TestImplementations { public class TestStringLogger : ILogger { StringBuilder _builder = new StringBuilder(); public IDisposable BeginScope(TState state) => null; public bool IsEnabled(LogLevel logLevel) => true; public void Log(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func formatter) { _builder.AppendLine(formatter(state, exception)); } public string GetLogs() { return _builder.ToString(); } } }