kubemq-io / kubemq-Python

Python client for KubeMQ server https://kubemq.io
MIT License
23 stars 9 forks source link

update modules to use module name logging #25

Closed bamsutler closed 1 year ago

bamsutler commented 2 years ago

Hi,

This PR corrects the use of the root logger in the python modules allowing consumers of your code to set their own log levels on your modules and have better logging control overall for their own applications.

The way this was written before, logs from these libraries were creating default log handlers and logging via the root logger.

In my use case where logs are set up with specialized handlers, I was getting multiple logs in the console with no way to disable the logger in these libraries. This change should allow that control as well as allow users to identify which modules are throwing errors/creating logs.

Please let me know if there is anything I need to do as a more formal process. I did not see a contribution guide in the repo.

Cheers