diff options
-rwxr-xr-x | bin/cfn-push-stats | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/cfn-push-stats b/bin/cfn-push-stats index da0d155..501a366 100755 --- a/bin/cfn-push-stats +++ b/bin/cfn-push-stats @@ -29,8 +29,7 @@ from boto.ec2 import cloudwatch log_format = '%(levelname)s [%(asctime)s] %(message)s' log_file_name = "/var/log/cfn-push-stats.log" logging.basicConfig(filename=log_file_name, - format=log_format, - level=logging.DEBUG) + format=log_format) LOG = logging.getLogger('cfntools') try: @@ -108,6 +107,11 @@ credentials = cfn_helper.parse_creds_file(args.credential_file) namespace = 'system/linux' data = {} +# Logging +# ======= +if args.verbose: + LOG.setLevel(logging.DEBUG) + # Generic user-specified metric # ============================= if args.metric and args.units and args.value: |