添加属性依赖注入、添加自定义日志扩展

This commit is contained in:
陈淳
2022-11-07 01:31:37 +08:00
parent 86e869ff16
commit d6ca4429d5
13 changed files with 218 additions and 21 deletions

View File

@@ -0,0 +1,22 @@
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.WebCore.LogExtend
{
public class CustomLoggerProvider : ILoggerProvider
{
//创建我们自定义日志的方法
public ILogger CreateLogger(string categoryName)
{
return new CustomLogger();
}
public void Dispose()
{
}
}
}