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

Prevent log propagation globally #469

Draft
wants to merge 1 commit into
base: prerelease
Choose a base branch
from

Conversation

Cybis320
Copy link
Contributor

Prevented log propagation by setting log.propagate = False in the logger initialization and remove log.propagate = False from BufferedCapture.py.

@Cybis320 Cybis320 requested a review from markmac99 November 19, 2024 16:26
@markmac99
Copy link
Contributor

unfortunately, no change. In my simple test case, the second call to initlogging() still causes infinite recursion.

@markmac99
Copy link
Contributor

ok, try addigg this at the start of initlogging() to reset stdout back to normal:

sys.stdout = sys.__stdout__

This resets stdout so that the 2nd call doesn't recurse. The later call to set it to point to a logger then works fine i think.

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

Successfully merging this pull request may close these issues.

2 participants