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

Allow logging to terminal when progress bars are enabled #7648

Open
arya2 opened this issue Sep 29, 2023 · 1 comment
Open

Allow logging to terminal when progress bars are enabled #7648

arya2 opened this issue Sep 29, 2023 · 1 comment
Labels
C-cleanup Category: This is a cleanup C-enhancement Category: This is an improvement I-usability Zebra is hard to understand or use S-needs-investigation Status: Needs further investigation

Comments

@arya2
Copy link
Contributor

arya2 commented Sep 29, 2023

Motivation

Zebra's terminal output is weird when progress bars are enabled without logging to a file.

It would be nice for users to be able to see warning logs adjacent to the progress bars.

Possible Designs

One of:

  • Pass the non-blocking logger a struct that implements Writer with howudoin::Tx::{add_warn, add_info, ..}
  • Call tracing::{info, warn, trace, debug} through functions defined in Zebra that call howudoin's log methods instead of the tracing methods when progress bars are enabled and writing logs to the terminal
  • Use indicatif directly instead of howudoin and implement Writer to write to stdout from suspend()
  • Add suspend() to howudoin and implement Writer to write to stdout from suspend()
@arya2 arya2 added C-enhancement Category: This is an improvement C-cleanup Category: This is a cleanup S-needs-investigation Status: Needs further investigation I-usability Zebra is hard to understand or use P-Optional ✨ labels Sep 29, 2023
@teor2345
Copy link
Collaborator

This is currently handled by always sending logs to a file when progress bars are configured.

Showing both logs and progress bars at the same time is something to consider after we implement separate summary and detailed modes.

@teor2345 teor2345 changed the title Fix logging to terminal when progress bars are enabled Allow logging to terminal when progress bars are enabled Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: This is a cleanup C-enhancement Category: This is an improvement I-usability Zebra is hard to understand or use S-needs-investigation Status: Needs further investigation
Projects
Status: New
Development

No branches or pull requests

3 participants