BewareMyPower commented on issue #393: URL: https://github.com/apache/pulsar-client-cpp/issues/393#issuecomment-1925563967
First, these logs come from the stats timer. You can disable the stats by configuring the stats interval with 0. https://github.com/apache/pulsar-client-cpp/blob/c7e53acfc7c31c19ba623fed011caee3c6571a3f/include/pulsar/ClientConfiguration.h#L293 Second, if you really want to disable the INFO logs rather than the stats timer. You can configure a customized logger. https://github.com/apache/pulsar-client-cpp/blob/c7e53acfc7c31c19ba623fed011caee3c6571a3f/include/pulsar/ClientConfiguration.h#L188 There are two built-in loggers: - https://github.com/apache/pulsar-client-cpp/blob/main/include/pulsar/ConsoleLoggerFactory.h - https://github.com/apache/pulsar-client-cpp/blob/main/include/pulsar/FileLoggerFactory.h For simplicity, if you still want to print logs to console and just change the log level to warn, here is an example. ```c++ ClientConfiguration conf; conf.setLogger(new ConsoleLoggerFactory(Logger::LEVEL_WARN)); Client client("pulsar://localhost:6650", conf); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
