Closed zhijian-pro closed 1 year ago
Mixing logs and progress bars at the same time is a bad idea IMHO. Log is supposed to be printed to hard media like paper in order to be read later, while progress bar can't be printed to a paper due to its interactive nature. This is the main reason I will not accept your PR #106 no matter how good it is.
What you say is also reasonable, but undeniably, progress bar and log record both have prompt function on terminal.And logs can express information that progress bars cannot replace. For example, an exception occurs in the ninth order. This exception only affects the ninth order, not the others, so the application should continue to run, But it should also be immediately obvious to the user that there is a problem with the ninth that needs attention. You can also see that many people have feedback on similar problems under many progress bar frameworks, which shows that this demand is common.
I believe that my case is similar as @zhijian-pro. I'm looking for a multi progress bar
which is capable of tracing a progress and present information about matching records. Such a solution exists in indicatif. indicatif
exposes a function println which prints a message above a single or multi progress bar.
What do you think @vbauerster about extending current progress bar api by supporting of printing a message?
Thanks for the answer and pointing out the example. I’ll take a look.
You forgot to count unresolved issues related to that feature.
That’s so true for both - forgetting and number of issues :) :) some of the issues I’ve omitted by creating a printing sequence. So it’s done in one thread.
For now, I’ve got tired of borrowing
and moving
in rust and went to golang. That’s why this library got my attention.
If you need to print something above a bar while it's running, please refer to this example.
It's complicated and seems the contents should be predefined. It will print everytime the progressbar refreshed, which may not the same as what we need (the behaviors like npm install
).
The log will be overwritten while the progress bar is printed. How to set not to overwrite the log, but to move the progress bar down one line?