AddLogging的使用
services.AddLogging(logBuilder => { logBuilder.AddConsole(); });
AddLogging的实现
public static IServiceCollection AddLogging(this IServiceCollection services, Action<ILoggingBuilder> configure)
{
// ...
}
实现ILoggingBuilder的AddConsole方法
- 获取叫做扩展的ILoggingBuilder的方法
public static ILoggingBuilder AddConsole(this ILoggingBuilder builder)
{
// ...
}
标签:...,logBuilder,ILoggingBuilder,IServiceCollection,AddConsole,接口,dotnet,logger,Ad
From: https://www.cnblogs.com/zhuoss/p/18012681