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

Debug logging printing to stdout tasks using requests package #6

Open
bt- opened this issue Sep 24, 2023 · 1 comment
Open

Debug logging printing to stdout tasks using requests package #6

bt- opened this issue Sep 24, 2023 · 1 comment

Comments

@bt-
Copy link

bt- commented Sep 24, 2023

Thanks for making this available, it wraps up multiprocessing and threading nicely for my use case!

I'm using this to pull data from a server making requests using the requests package. It works, but the I think the requests.get calls I'm making are printing debug statements for each loop. I'm using atpbar as well and this debug statements are causing the progress bars to be re-printed alternating with the requests debug statements rather than updating.

I tried following the example showing how to use logging and tried that with level=logging.DEBUG, but so far that hasn't prevented the debug statements from being printed. Quite possibly because I've implemented it wrong.

I just tried turning off the logging by doing the following, which worked.

def _configure_logger(self):
    # handler = QueueHandler(self.logging_queue)
    # logger = logging.getLogger()
    # logger.setLevel(logging.DEBUG)
    # logger.addHandler(handler)
    pass

Any suggestions on a better option? I would think the logging example would work if it was re-directing the requests debug statements to a file, so maybe I just have an issue there. Thanks!

@TaiSakuma
Copy link
Member

If you check out atpbar from the HEAD of the main branch in the GitHub repo, the stdout and stderr will be printed above the progress bars. Hopefully, that will solve the problem.

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