Skip to content

Support -v, -vv, -vvv, -q, -qq, -qqq for verbosity #1244

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

Merged
merged 2 commits into from
Dec 17, 2020

Conversation

dominiklohmann
Copy link
Member

📔 Description

short option long option
-qqq --verbosity=quiet
-qq --verbosity=error
-q --verbosity=warning
--verbosity=info (default)
-v --verbosity=verbose
-vv --verbosity=debug
-vvv --verbosity=trace

📝 Checklist

  • All user-facing changes have changelog entries.
  • The changes are reflected on docs.tenzir.com/vast, if necessary.
  • The PR description contains instructions for the reviewer, if necessary.

🎯 Review Instructions

Try it!

@dominiklohmann dominiklohmann force-pushed the story/ch13943/vvvvvvvvv branch from 1f4772a to 887d1b3 Compare December 17, 2020 14:50
|short option|long option|
|-|-|
|-qqq|--verbosity=quiet|
|-qq|--verbosity=error|
|-q|--verbosity=warning|
||--verbosity=info (default)|
|-v|--verbosity=verbose|
|-vv|--verbosity=debug|
|-vvv|--verbosity=trace|
Copy link
Member

@mavam mavam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this as follows:

vast start
vast -v start
vast -vv start
vast -vvv start

All good. Then I tried the "quiet" mode by trying to bind twice to the same port with two instances of vast start.

vast -q start
!! filesystem_error: "PID file found: " "[..]/vast.db/pid.lock" "terminate process" "95957"

I get this for all variations of quietness, i.e., -q, -qq, and -qqq. Is this expected behavior?

@dominiklohmann
Copy link
Member Author

I get this for all variations of quietness, i.e., -q, -qq, and -qqq. Is this expected behavior?

Yes, because that error is printed on stderr, and without going through any of our logger macros.

@dominiklohmann dominiklohmann requested a review from mavam December 17, 2020 15:29
Copy link
Member

@mavam mavam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work. Small but really handy feature!

@dominiklohmann dominiklohmann merged commit c16df0b into master Dec 17, 2020
@dominiklohmann dominiklohmann deleted the story/ch13943/vvvvvvvvv branch December 17, 2020 16:07
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

Successfully merging this pull request may close these issues.

2 participants