rsalmei / alive-progress

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

Option to hide the progress bar #222

Closed tfardet closed 1 year ago

tfardet commented 1 year ago

First of, I love how well this library interacts with logging, congrats on the nice work! Once thing that would be really great, to make the feature complete in my opinion, would be the possibility to set the equivalent of a logging level to the progress bar.

Indeed, inside a library, it might be great to have the progress bar, but when you reuse the same library somewhere else, you may want an easy way to hide some information (some progress bars included) from the terminal output.

Looking through the README, I could not find any obvious way to do that. I could obviously find a way to write my code so that, when the logging level is above some value, the progress bar is not called, but that will be a bit cumbersome and ugly, so if there is some kind of "display: none" option, or an easy way to redirect the output, I'd appreciate the tip :)

tfardet commented 1 year ago

My bad, I thought I tried disable but I might not have properly run my install process, now I see it works, sorry for the noise. Also here are the previous issue and PR for reference:

https://github.com/rsalmei/alive-progress/issues/103 https://github.com/rsalmei/alive-progress/pull/111

rsalmei commented 1 year ago

Hey, no problem! I'm glad you've found it 👍