public KafkaLoggerProvider(IOptionsMonitor <KafkaLoggerOptions> options) { loggerOptions = options.CurrentValue; producer = KafkaProducer.Create(loggerOptions); producer.DefaultKey = loggerOptions.Key; producer.DefaultTopic = loggerOptions.Topic; producer.InitializeCount = loggerOptions.InitializeCount; }
public KafkaLogger(string category, KafkaLoggerOptions options, KafkaProducer producer) { this.category = category ?? ""; this.loggerOptions = options; this.producer = producer; }