rsalmei / alive-progress

A new kind of Progress Bar, with real-time throughput, ETA, and very cool animations!
MIT License
5.53k stars 206 forks source link

"on X:" output on every line #281

Closed DemonPandaz2763 closed 1 month ago

DemonPandaz2763 commented 1 month ago

"on X:" is being printed on every line while using "alive_bar(total)". Commenting this out (not using the bar anymore) fixes the problem.

with bar:

    bar = alive_bar(total_reqs, title="Name", spinner="dots")

    with ThreadPoolExecutor(max_workers=number_threads) as exe:
        future_to_url = {
            exe.submit(worker, session, base_url + word, parsed_codes, killer, output_queue): word for word in extended_wordlist
        }
        for future in as_completed(future_to_url):
            if killer.kill_now:
                exe.shutdown(wait=False, cancel_futures=True)
                break

            completed_reqs += 1
            bar()

image

without bar:

    #bar = alive_bar(total_reqs, title="Name", spinner="dots")

    with ThreadPoolExecutor(max_workers=number_threads) as exe:
        future_to_url = {
            exe.submit(worker, session, base_url + word, parsed_codes, killer, output_queue): word for word in extended_wordlist
        }
        for future in as_completed(future_to_url):
            if killer.kill_now:
                exe.shutdown(wait=False, cancel_futures=True)
                break

            completed_reqs += 1
            #bar()

image

TheTechRobo commented 1 month ago

Set enrich_print=False.

DemonPandaz2763 commented 1 month ago

Thank you, that worked. :D

TheTechRobo commented 1 month ago

Glad to hear it!

For future reference, all of the configuration options are listed in the Configuration section of the README.

rsalmei commented 1 month ago

Yep, that's a feature, not a problem. It informs you where the bar was when the print happened. Thanks @TheTechRobo 👍

DemonPandaz2763 commented 1 month ago

Glad to hear it!

For future reference, all of the configuration options are listed in the Configuration section of the README.

Yeah, I didn't realize it was a part of logging.