public ZLoggerLogProcessorLoggerProvider(IAsyncLogProcessor processor) { this.processor = processor; }
public static ILoggingBuilder AddZLoggerLogProcessor(this ILoggingBuilder builder, IAsyncLogProcessor logProcessor, Action <ZLoggerOptions> configure) { if (configure == null) { throw new ArgumentNullException(nameof(configure)); } builder.AddZLoggerLogProcessor(logProcessor); builder.Services.Configure(configure); return(builder); }
public AsyncProcessZLogger(string categoryName, IAsyncLogProcessor logProcessor) { this.categoryName = categoryName; this.logProcessor = logProcessor; }
public static ILoggingBuilder AddZLoggerLogProcessor(this ILoggingBuilder builder, IAsyncLogProcessor logProcessor) { builder.AddConfiguration(); builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton <ILoggerProvider, ZLoggerLogProcessorLoggerProvider>(x => new ZLoggerLogProcessorLoggerProvider(logProcessor, x.GetService <IOptions <ZLoggerOptions> >()))); LoggerProviderOptions.RegisterProviderOptions <ZLoggerOptions, ZLoggerLogProcessorLoggerProvider>(builder.Services); return(builder); }
public ZLoggerLogProcessorLoggerProvider(IAsyncLogProcessor processor, IOptions <ZLoggerOptions> options) { this.processor = processor; }