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

Wrong log output to stdout. May break apps using library. #153

Closed
Kishi85 opened this issue Aug 24, 2021 · 2 comments
Closed

Wrong log output to stdout. May break apps using library. #153

Kishi85 opened this issue Aug 24, 2021 · 2 comments

Comments

@Kishi85
Copy link

Kishi85 commented Aug 24, 2021

commit fd40b73 added a print() statement to the disconnect function that always outputs "Disconnect request" to stdout. This can break apps using pysyncobj due to excessive log output in interactive use-cases.

Example: Patroni's edit-config feature spawns vi to edit the config values, which gets totally plastered by above message while the config is edited, making the editing almost impossible due to not being able to see what is actually done.

I propose to change the output from print(...) to using python logging (using level DEBUG?) as it is already used in syncobj.py and this seems to be an oversight from implementing/testing.

@bakwc
Copy link
Owner

bakwc commented Aug 24, 2021

Oh, sorry, that was not intended to go to production. Removed that print, updated in pip, please update version to 0.3.10.
I will add a unit-test to avoid adding prints in the future, #154

@Kishi85
Copy link
Author

Kishi85 commented Aug 24, 2021

Thank you, that fixes the issue!

@Kishi85 Kishi85 closed this as completed Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants