Skip to content

Commit

Permalink
Add --quiet option to set loglevel to WARNING.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hannes Koerber committed Mar 15, 2016
1 parent eadf48f commit 8aa93b6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions graphios.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@

parser.add_option('-v', "--verbose", action="store_true", dest="verbose",
help="sets logging to DEBUG level")
parser.add_option('-q', "--quiet", action="store_true", dest="quiet",
help="sets logging to WARNING level")
parser.add_option("--spool-directory", dest="spool_directory",
default=spool_directory,
help="where to look for nagios performance data")
Expand Down Expand Up @@ -275,6 +277,9 @@ def verify_options(opts):
if opts.verbose:
cfg["debug"] = True
cfg["log_level"] = "logging.DEBUG"
elif opts.quiet:
cfg["debug"] = False
cfg["log_level"] = "logging.WARNING"
else:
cfg["debug"] = False
cfg["log_level"] = "logging.INFO"
Expand Down

0 comments on commit 8aa93b6

Please sign in to comment.