Blame SOURCES/0001-Changed-logger-init-and-added-verbose-arg-handling.patch

a64660
From 7a604b2d5cb3468bedcdc91c858a8a29c5bbcd05 Mon Sep 17 00:00:00 2001
a64660
From: twm2016 <TM2086@att.com>
a64660
Date: Wed, 24 Feb 2016 13:22:43 -0600
a64660
Subject: [PATCH 01/21] Changed logger init and added verbose arg handling
a64660
a64660
Initialized logger with default value of NOTSET.
a64660
a64660
Added if statement to handle verbose argument and set the logger to
a64660
DEBUG.
a64660
a64660
Change-Id: I997b8b964dade013db265d088d00ccfdd6ab030e
a64660
Closes-Bug: #1269465
a64660
---
a64660
 bin/cfn-push-stats | 8 ++++++--
a64660
 1 file changed, 6 insertions(+), 2 deletions(-)
a64660
a64660
diff --git a/bin/cfn-push-stats b/bin/cfn-push-stats
a64660
index da0d155..501a366 100755
a64660
--- a/bin/cfn-push-stats
a64660
+++ b/bin/cfn-push-stats
a64660
@@ -29,8 +29,7 @@ from boto.ec2 import cloudwatch
a64660
 log_format = '%(levelname)s [%(asctime)s] %(message)s'
a64660
 log_file_name = "/var/log/cfn-push-stats.log"
a64660
 logging.basicConfig(filename=log_file_name,
a64660
-                    format=log_format,
a64660
-                    level=logging.DEBUG)
a64660
+                    format=log_format)
a64660
 LOG = logging.getLogger('cfntools')
a64660
 
a64660
 try:
a64660
@@ -108,6 +107,11 @@ credentials = cfn_helper.parse_creds_file(args.credential_file)
a64660
 namespace = 'system/linux'
a64660
 data = {}
a64660
 
a64660
+# Logging
a64660
+# =======
a64660
+if args.verbose:
a64660
+    LOG.setLevel(logging.DEBUG)
a64660
+
a64660
 # Generic user-specified metric
a64660
 # =============================
a64660
 if args.metric and args.units and args.value:
a64660
-- 
a64660
2.20.1
a64660