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

Better verbosity settings #55

Merged
merged 2 commits into from
Jan 10, 2019

Conversation

Lsquared13
Copy link

I had some confusion around logging levels, mostly coming from other Go software like geth where verbosity goes up to 5 or 6. Submitting some small user experience improvements to verbosity handling that would have made my life easier.

  • Include verbosity levels in help printout: I had to dig through source code to figure out my verbosity options
  • Include a default statement in the verbosity switch: Providing behavior more in line with what a user specifying a high verbosity is likely to want. Lack of a default statement led to zero-valued defaults being used which led to the lowest possible logging level, despite the fact that being in the default case implies the user wants a high verbosity.

Louis added 2 commits December 28, 2018 17:15
This allows users to understand the logging levels and how they 
correspond to verbosity levels without reading the source code.
Before this change, a user specifying a verbosity > 3 would not hit any 
case in the verbosity switch statement, and the Go zero-valued default 
would result in FATAL level logs only. This is unlikely to be their 
intention.

This change will cause the log level to default to DEBUG, which is 
likely what a user specifying a high verbosity wants. A user who does 
not specify a default will still get WARN level logging by default due 
to CLI defaults.
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.

None yet

2 participants