skippyPeanutButter / yaml_bot

Validate the content of a yaml file according to a set of rules
MIT License
3 stars 0 forks source link

Verbosity options -v vs -vv vs -vvv #19

Open samrocketman opened 7 years ago

samrocketman commented 7 years ago

You should modify your info(), warn(), and error() methods to only throw an error if a certain verbosity level is reached. The logic for detecting verbosity should go inside of those logging methods (as opposed to other parts of the code) because it would be less duplication of code.

Here's recommended integers to determine verbosity.

Int Purpose
0 Error output (>= 0)
1 Warning output (>= 1)
2 Info output (>= 2)

The logic behind the above output is: