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

mithril-client verbosity not following usage menu #1325

Closed
TrevorBenson opened this issue Oct 30, 2023 · 2 comments · Fixed by #1373
Closed

mithril-client verbosity not following usage menu #1325

TrevorBenson opened this issue Oct 30, 2023 · 2 comments · Fixed by #1373
Assignees
Labels
bug ⚠️ Something isn't working

Comments

@TrevorBenson
Copy link
Contributor

TrevorBenson commented Oct 30, 2023

Context & versions

When checking the help menu (usage) of mithril-client it states each additional v increases verbosity from WARNING, to INFO to DEBUG. However, in practice, it appears a single v produces INFO and two v's produce DEBUG level.

Mithril client is from release binaries 2337.0 - mithril-client 0.4.2+7d5a683.

Steps to reproduce

  1. Run mithril-client -h
  2. Observe usage menu:
  3. Verbosity level (-v=warning, -vv=info, -vvv=debug)
  4. Run mithril-client -v [...]
  5. Observe INFO level messages
  6. Run mithril-client -vv [...]
  7. Observe DEBUG level messages

Actual behavior

When running mithril-client -vv [...] the following can be observed:

Oct 30 16:01:49.508 DEBG Run Mode: dev                                                                                                                                                                             
Oct 30 16:01:49.508 DEBG Reading configuration file './config/dev.json'.                                                                                                                                           
Oct 30 16:01:49.508 DEBG New AggregatorHTTPClient created
Oct 30 16:01:49.508 DEBG New MithrilCertificateVerifier created                                          
Oct 30 16:01:49.508 DEBG Snapshot service: show.                                                                                                                                                                   
Oct 30 16:01:49.508 DEBG Snapshot service: list.                                                                                                                                                                   
Oct 30 16:01:49.508 DEBG GET url='https://aggregator.release-preprod.api.mithril.network/aggregator/artifact/snapshots'.                                                                                           
Oct 30 16:01:49.526 DEBG Prepare request with version: 0.1.11                                                                                                                                                      
Oct 30 16:01:50.427 DEBG GET url='https://aggregator.release-preprod.api.mithril.network/aggregator/artifact/snapshot/e9e0172b9b916e5a5432fac75f7187ba20c50426d70ed900e22a53aa7304b804'.                           
Oct 30 16:01:50.451 DEBG Prepare request with version: 0.1.11                                            
1/6 - Checking local disk info…                     
Oct 30 16:01:51.220 DEBG Snapshot service: download.                                                                                                                                                               
2/6 - Fetching the certificate's information…                                                                                                                                                                      
Oct 30 16:01:51.221 DEBG GET url='https://aggregator.release-preprod.api.mithril.network/aggregator/certificate/9a7718437af171c64adc8ebd93e1de78996c27a39e1cf3a782189c90afe9f841'.                                 
Oct 30 16:01:51.235 DEBG Prepare request with version: 0.1.11                                                                                                                                                      
3/6 - Verifying the certificate chain…                                                                   
⠁                                                                                                        
Oct 30 16:01:52.682 DEBG Verifying certificate, certificate_beacon: Beacon { network: "preprod", epoch: Epoch(103), immutable_file_number: 1987 }, certificate_previous_hash: a5cb43ffd7989e8a03235cedb7a30cd9b5c8e
fcbbabc0e5510b514187308b732, certificate_hash: 9a7718437af171c64adc8ebd93e1de78996c27a39e1cf3a782189c90afe9f841                                                                                                    

I'm unsure if the typo of DEBG vs. DEBUG is intentional and all logs are using a 4-character log level, I have not seen if it's WARN or WARNING in the logs. If it is not being limited to 4 characters then DEBG I presume is also a typo.

Expected behavior

Using one v would enable WARNING and two V's would enable both WARNING and INFO levels, but not the DEBUG level.

@jpraynaud jpraynaud added the bug ⚠️ Something isn't working label Oct 30, 2023
@dlachaume dlachaume mentioned this issue Nov 27, 2023
11 tasks
@dlachaume
Copy link
Collaborator

Hello @TrevorBenson,

The PR #1373 fix the problems you've reported.

For the comment on DEBG, there's nothing we can do about it because it's part of slog crate (WARNING level is WARN).

Thank you for the detailed description of your issue.

@TrevorBenson
Copy link
Contributor Author

Hello @TrevorBenson,

The PR #1373 fix the problems you've reported.

For the comment on DEBG, there's nothing we can do about it because it's part of slog crate (WARNING level is WARN).

Thank you for the detailed description of your issue.

I figured it might be tied into some library instead of a typo to be resolved. Thanks for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ⚠️ Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants