OpenAuth.Net/Infrastructure/StartupLogger.cs
2021-01-04 22:17:49 +08:00

24 lines
518 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Microsoft.Extensions.Logging;
namespace Infrastructure
{
/// <summary>
/// 从3.0开始Startup ConfigureServices中不能使用ILogger需要扩展
/// </summary>
public class StartupLogger
{
private readonly ILogger<StartupLogger> _logger;
public StartupLogger(ILogger<StartupLogger> logger)
{
_logger = logger;
}
public void LogInformation(string message)
{
_logger.LogInformation(message);
}
}
}