Beispiel #1
0
 public ShopLoggerProvider(ShopLoggerConfiguration configuration, Func <LogSink> sinkFactory)
 {
     this.Configuration = configuration;
     this.Loggers       = new ConcurrentDictionary <string, ShopLogger>();
     this.SinkFactory   = sinkFactory;
 }
Beispiel #2
0
 public static ILoggingBuilder AddShopLogger(this ILoggingBuilder builder, ShopLoggerConfiguration configuration, Func <LogSink> sinkFactory) =>
 builder.AddProvider(new ShopLoggerProvider(configuration, sinkFactory));
 public ShopLogger(ShopLoggerConfiguration configuration, Func <LogSink> sinkFactory)
 {
     this.Configuration = configuration;
     this.Sink          = new Lazy <LogSink>(sinkFactory);
 }