Rollup node/UX: only show progress bars in tty
Context
!10979 (merged) has introduced progress bars for the rollup node but this functionality is not very well suited when the output of the rollup node is redirected outside of a tty (the logs fill up with intermediate displays of progress and escape codes). This MR makes it so that the Progress_bar
module does not produce animation outside of a tty. Instead only the message on a single line is outputed.
Fixes #6660 (closed).
Manually testing the MR
- Modify the file
<data-dir>/storage/version
to change the version of the store of the rollup node and force a migration. - Start the rollup node normally and observe that a progress bar is displayed on the terminal.
- Repeat (1).
- Start the rollup node with
octez-smart-rollup-node run &> /tmp/rnlog
and observe that/tmp/rnlog
is not filled with escape codes.
Edited by Alain Mebsout