morganstanley / modern-cpp-kafka

A C++ API for Kafka clients (i.e. KafkaProducer, KafkaConsumer, AdminClient)
Apache License 2.0
331 stars 86 forks source link

I am looking for an example with logging enabled to go to a file. #217

Open TruthPhx opened 11 months ago

TruthPhx commented 11 months ago

Attached documentation and code samples are primitive.

I am looking for a way to call the Kafka_client with logging to a file and couldn't find the code documentation. Any help would be appreciated.

kenneth-jia commented 11 months ago

You could just customized your log_cb (for the properties), and here's an example, https://github.com/morganstanley/modern-cpp-kafka/blob/main/tests/unit/TestProperties.cc#L19