mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
19 lines
475 B
C#
19 lines
475 B
C#
using Microsoft.Extensions.Logging;
|
|
|
|
class ConsoleLogger : ILogger
|
|
{
|
|
public IDisposable BeginScope<TState>(TState state) where TState : notnull
|
|
{
|
|
return null;
|
|
}
|
|
|
|
public bool IsEnabled(LogLevel logLevel)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
|
|
{
|
|
Console.WriteLine(formatter(state, exception));
|
|
}
|
|
} |