public static ILoggingBuilder AddMerchant(this ILoggingBuilder builder, Action <MerchantLoggerConfiguration> action) { var config = new MerchantLoggerConfiguration(); action(config); if (string.IsNullOrEmpty(config.WebhookURL)) { throw new ArgumentException($"{nameof(config.WebhookURL)} must be informed"); } builder.AddProvider(new MerchantLoggerProvider(config)); return(builder); }
public MerchantLoggerProvider(MerchantLoggerConfiguration configuration) { _configuration = configuration; }