Skip to content

I can't get a logger instance from di (kafka) #466

@saneks222

Description

@saneks222

In Confluent.Kafka, there is a SetLogHandler method for configuring logging in producers and consumers. It is available through the ProducerBuilderFactory and ConsumerBuilderFactory properties. However, there is no way in this method to get an instance of the ILogger object, which is used by the corresponding classes.

Because of this, when configuring the logging of events occurring inside librdkafka, you have to use a static instance of the logger. And the static logger may lack the necessary context that specific IConsumer and IProducer instances have.

Maybe I'm missing something, but after studying the repository, I haven't found any mechanisms that would allow me to do this.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions