-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
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
Multi Topic consumer not using client provided logger - MultiTopicsConsumerImpl:526 | Received Message from one of the topic #216
Comments
It seems that you need to set In my local env, the following code print no logs: pulsar_logger = logging.getLogger("pulsar")
pulsar_logger.setLevel(logging.INFO)
client = pulsar.Client('pulsar://localhost:6650', logger=pulsar_logger)
# ... However, after adding
And I can also change the log level to bug with
But after removing the |
Thank you for your answer ! Passing a logger to Pulsar Client has always seem to work fine, and the associated level was always respected. But for some reason, using a Multi Topic Consumer is not working as it should, and is logging this very specific DEBUG logging for every single message ( Also, this is the only DEBUG statement being printed. That is why I was suspecting a bug in Pulsar Client. Another strange observation is that replacing this Multi Topic Consumer by a Single Topic Consumer (replacing the list of topics with a simple string), immediately remove this particular DEBUG statement. I'm still not sure if it's a bug, a dependency race condition or simply an implementation issue on my end. For the time being, I'm replacing the Multi Topic Consumer with a home-made multi-threaded (multiple) Single Topic Consumers.. |
I have the same issue as @Vincouux mentioned using Python 3.12 and pulsar-client 3.5.0. |
We found a workaround @hugoallaine , try using: from pulsar import ConsoleLogger
client = Client(URL, logger=ConsoleLogger()) |
@stap-odin Thanks, this works well (and can be improved by using LoggerLevel from pulsar lib as a ConsoleLogger parameter if needed). |
Instantiating a multi topic consumer, using a client with provided logger, result undesired debug logging, which logs the a dump of the message. This can result in extremely high logging storage cost.
Here is how to reproduce :
What I expected to see :
No logging with log level lower than INFO
What I see :
Dump of every single message received by the consumer:
Environment :
The text was updated successfully, but these errors were encountered: