Skip to content

Commit

Permalink
tools/ops add a verbose flag to mugc.py (cloud-custodian#1103)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaroot authored and kapilt committed May 2, 2017
1 parent 78218a2 commit bde6e45
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tools/ops/mugc.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ def setup_parser():
parser.add_argument(
"--assume", default=None, dest="assume_role",
help="Role to assume")
parser.add_argument(
"-v", dest="verbose", action="store_true", default=False,
help='toggle verbose logging')
return parser


Expand All @@ -111,8 +114,11 @@ def main():
options.log_group = None
options.cache_period = 0
options.cache = None
log_level = logging.INFO
if options.verbose:
log_level = logging.DEBUG
logging.basicConfig(
level=logging.DEBUG,
level=log_level,
format="%(asctime)s: %(name)s:%(levelname)s %(message)s")
logging.getLogger('botocore').setLevel(logging.ERROR)
logging.getLogger('c7n.cache').setLevel(logging.WARNING)
Expand Down

0 comments on commit bde6e45

Please sign in to comment.