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

Any option to print logs below progress bar, without progress bar getting duplicated? #118

Closed
roshinimichael opened this issue Dec 7, 2022 · 3 comments

Comments

@roshinimichael
Copy link

roshinimichael commented Dec 7, 2022

Currently my single progress bar gets duplicated, if any log output is printed in any of the calling functions.

Bar 1 ∙∙∙ [############################################..................] 71 %
Log output 1
Bar 1    [##############################################################] 100 %
Log output 2

Is there a way to print any associated logs like this, for a single progress bar?

Bar 1    [##############################################################] 100 %
Log output 1
Log output 2
@mskonovalov
Copy link

mskonovalov commented Dec 14, 2022

Yes, there is a way to do it.
Follow this example _examples/progressAsWriter/main.go

Also #105 for the context

@mskonovalov
Copy link

mskonovalov commented Dec 14, 2022

oh, sorry, you cannot print log below only above, because the way how progress bar is working in terminal it can work only on the last line.

@roshinimichael
Copy link
Author

thank you for your response!

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

2 participants