mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-04-05 17:38:01 +08:00
24 lines
518 B
C#
24 lines
518 B
C#
|
||
|
||
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);
|
||
}
|
||
}
|
||
} |