-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Log output on top of spinner #36
Comments
Hi Sean, Thanks for using this gem and contributing! I'm in for adding logging to print information. Would you have time to add |
I have been able to achieve this fairly reliably by using spinner.auto_spin
sleep 3
spinner.clear_line
puts 'log output'
sleep 3
spinner.success('Done') |
@smackesey I know it's a while but I finally got around to work on this issue. There is a spinner = TTY::Spinner.new("[:spinner] Logging output ...")
spinner.auto_spin
(1..5).each { |i| spinner.log("\r#{i}"); sleep 1 }
spinner.stop('done') |
@icy-arctic-fox There is a new spinner.auto_spin
sleep 3
spinner.log "log output"
sleep 3
spinner.success("Done") |
Thanks for a great library! A request: I'd like to be able to log output above the spinner while keeping the spinner going uninterrupted at the bottom of the screen. So far as I can tell this library does not support this behavior. The closest I've gotten is the following code:
But the message only overwrites part of the spinner. And if the lines are coming too fast, it does not work at all (i.e. the spinner doesn't seem to get redrawn on the bottom line):
The text was updated successfully, but these errors were encountered: