Skip to content
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

Logger should be per client rather than global #503

Open
z-br opened this issue Apr 29, 2021 · 1 comment
Open

Logger should be per client rather than global #503

z-br opened this issue Apr 29, 2021 · 1 comment

Comments

@z-br
Copy link

z-br commented Apr 29, 2021

It would be really great if the logger could be initialized with the client, rather than shared globally. We use many clients in one process and sometimes just want to debug one of them. It also makes reading the logs tricky, because we don't know which logs are for which client.

@MattBrittan
Copy link
Contributor

Would be happy to accept a PR that implements this (I think most users, myself included, connect to one broker and the logging works OK in that situation). My preference would be that the client defaults to the global logger because this would avoid breaking existing changes (altering the logger whilst the client is running leads to a race so not too worried about breaking that).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants