Skip to content
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

Output while spinning #120

Open
mcshaman opened this issue Aug 17, 2019 · 3 comments
Open

Output while spinning #120

mcshaman opened this issue Aug 17, 2019 · 3 comments

Comments

@mcshaman
Copy link

Is it possible to continue the spinner while still printing to stdout?

I am using node to spin up and down servers and I am trying to get the spinner to persist on the last line while logging... However for every line of ora either overwrites the log line or it freezes, at its current state, writes the log line and then starts another spinner.

I can get around it by wrapping all output statements around a query that checks if the spinner is spinning and if so, stop the spinner, print the line and start the spinner again... However it seems like such a common requirement that I figure there must me a way to do this already?

@lone-cloud
Copy link

lone-cloud commented Jan 18, 2021

My workaround:

const status = ora().start();
...
status.info('doing stuff').start();

@eahefnawy
Copy link

This works:

spinner.clear()
console.log('doing stuff')
spinner.render()

@peterp
Copy link

peterp commented Jun 19, 2021

spinner.start("Message...") seems to work nicely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants