-
Notifications
You must be signed in to change notification settings - Fork 84
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
Allows log without disturbing progress bars #57
Conversation
Dear @dlvoy thanks for your contribution! currently i cannot merge your pull request because:
generally i would recommend to redirect the stderr stream to a second terminal to display the progress bars during development. the current terminal can then handle any kind of stdout messages with standard log utils. best regards, Andi |
TL;DR: Having something like I understand your points but can argue on details :)
I know I can reconfigure everything for multi-console output etc. But I will argue the most users simply do not care or want to bother with multiple streams. I have spent half a day to work around this, and any other solution was worst:
|
please take a look into 6514f9e - it adds generic event support via EventEmitter - it should fulfill your requirements to add the logging as external component. currently i've no idea how to add log/debug output in a reliable way (single bar, multi bar, sync, async,...). your provided solution has a lot of limitation and will only work in some use cases for multi-bars :( |
@AndiDittrich wow! I am impressed! Basically replaced yesterdays handlers from #58 with Events I also have no idea how to make it for all kind of bars and all use cases - just proposed what will solve subset of needs, which are there (YAGNI). But with Events i can simply do that user-space side - so i will close this PR. Thanks again! |
v3.5.0 is out including the changes |
Using console.log together with cli-progress while progress bars are running disturbs bars and make log contents disappear under rendered bars.
This enhancement adds
log
method on MultiBar which blends nicely with standard rendering pipeline of progress bars.