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

Expose logging level via a CLI flag #603

Closed
Xophmeister opened this issue Aug 24, 2023 · 2 comments · Fixed by #583
Closed

Expose logging level via a CLI flag #603

Xophmeister opened this issue Aug 24, 2023 · 2 comments · Fixed by #583
Assignees
Labels
P2 major: an upcoming release type: feature request

Comments

@Xophmeister
Copy link
Member

Currently the logging level is exposed through the default env_logger environment variable RUST_LOG, which has poor discoverability. I propose the following:

  1. Expose the logging level through a CLI "verbosity" flag. The "usual" way of doing this is with -v, where more vs means more verbosity. (It looks like there is an off-the-shelf option for this, for clap.)

  2. Rather than RUST_LOG, we should use TOPIARY_LOG and document this better in the README.

💡 This issue depends on #583.

@Xophmeister
Copy link
Member Author

clap-verbosity-flag also adds a --quiet option which, for our purposes, is both unnecessary and its short option conflicts with our short option for --query. It's very simple to roll our own...

@Xophmeister
Copy link
Member Author

env_logger doesn't allow both (1) and (2) simultaneously, so I've stuck with (1)...

@Xophmeister Xophmeister added the P2 major: an upcoming release label Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 major: an upcoming release type: feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant