We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am using Pulsar Cpp in my project but it produces pulsar INFO logs roughly every 10 minutes. How can I close INFO logs from Pulsar? Example Log:
INFO [139790546368256] ProducerStatsImpl:87 | Producer [persistent://public/default/test_fm_2, ] , ProducerStatsImpl (numMsgsSent_ = 1151, numBytesSent_ = 99461243, sendMap_ = {[Key: Ok, Value: 1151], }, latencyAccumulator_ = Latencies [ 50pct: 2.70125ms, 90pct: 91.4338ms, 99pct: 353.278ms, 99.9pct: 540.775ms], totalMsgsSent_ = 1151, totalBytesSent_ = 99461243, totalAcksReceived_ = , totalSendMap_ = {[Key: Ok, Value: 1151], }, totalLatencyAccumulator_ = Latencies [ 50pct: 2.70125ms, 90pct: 91.4338ms, 99pct: 353.278ms, 99.9pct: 540.775ms])
The text was updated successfully, but these errors were encountered:
First, these logs come from the stats timer. You can disable the stats by configuring the stats interval with 0.
pulsar-client-cpp/include/pulsar/ClientConfiguration.h
Line 293 in c7e53ac
Second, if you really want to disable the INFO logs rather than the stats timer. You can configure a customized logger.
Line 188 in c7e53ac
There are two built-in loggers:
For simplicity, if you still want to print logs to console and just change the log level to warn, here is an example.
ClientConfiguration conf; conf.setLogger(new ConsoleLoggerFactory(Logger::LEVEL_WARN)); Client client("pulsar://localhost:6650", conf);
Sorry, something went wrong.
No branches or pull requests
I am using Pulsar Cpp in my project but it produces pulsar INFO logs roughly every 10 minutes. How can I close INFO logs from Pulsar?
Example Log:
INFO [139790546368256] ProducerStatsImpl:87 | Producer [persistent://public/default/test_fm_2, ] , ProducerStatsImpl (numMsgsSent_ = 1151, numBytesSent_ = 99461243, sendMap_ = {[Key: Ok, Value: 1151], }, latencyAccumulator_ = Latencies [ 50pct: 2.70125ms, 90pct: 91.4338ms, 99pct: 353.278ms, 99.9pct: 540.775ms], totalMsgsSent_ = 1151, totalBytesSent_ = 99461243, totalAcksReceived_ = , totalSendMap_ = {[Key: Ok, Value: 1151], }, totalLatencyAccumulator_ = Latencies [ 50pct: 2.70125ms, 90pct: 91.4338ms, 99pct: 353.278ms, 99.9pct: 540.775ms])
The text was updated successfully, but these errors were encountered: