public static IServiceCollection AddLogger(this IServiceCollection services, LoggerSettings settings)
        {
            services.AddSingleton(settings);
            services.AddSingleton(typeof(ILogger <>), typeof(Logger <>));

            return(services);
        }
示例#2
0
 public Logger(Microsoft.Extensions.Logging.ILogger <TSource> logger, LoggerSettings settings)
 {
     _logger         = logger;
     _loggerSettings = settings;
 }