Closed
Description
Description
Admin client from the library doesn't support specification of a logger. It generates the error:
TypeError: __init__() got an unexpected keyword argument 'logger
However, the producer and consumer clients do. Is there something I am missing, or is there an alternative to specify the logger in the admin client?
How to reproduce
import logging
import sys
from confluent_kafka.admin import AdminClient
logger = logging.getLogger("kafka_admin")
logger.setLevel(logging.INFO)
handler = logging.StreamHandler(sys.stdout)
handler.formatter = JsonFormatter("%(message)s")
logger.addHandler(handler)
logger.propagate = False
admin_client = AdminClient(config, logger=logger)
Checklist
Please provide the following information:
- confluent_kafka.version() is ('2.2.0', 33685504)
- confluent_kafka.libversion() is ('2.2.0', 33685759)
- OS = ubuntu