]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Fix the cfn logging
authorAngus Salkeld <asalkeld@redhat.com>
Thu, 26 Apr 2012 13:15:39 +0000 (23:15 +1000)
committerAngus Salkeld <asalkeld@redhat.com>
Thu, 26 Apr 2012 13:15:39 +0000 (23:15 +1000)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
heat/cfntools/cfn-hup
heat/cfntools/cfn-init

index 44f6222692f832f28c0b7716b4dae1a12b513f74..757f73d36f25e78e0d82cd0841ac2c5517cc67c8 100755 (executable)
@@ -55,9 +55,9 @@ file_handler.setFormatter(logging.Formatter(log_format))
 logging.getLogger().addHandler(file_handler)
 
 if args.verbose:
-    logger.basicConfig(format=log_format, level=logging.DEBUG)
+    logging.basicConfig(format=log_format, level=logging.DEBUG)
 else:
-    logger.basicConfig(format=log_format, level=logging.INFO)
+    logging.basicConfig(format=log_format, level=logging.INFO)
 
 main_conf_path = '/etc/cfn/cfn-hup.conf'
 try:
index 37e7a9118f07c0cda8f78445046d64beac8f884b..6eb9715b00a9f5f3a878a84b693847b81cfdf6cf 100755 (executable)
@@ -47,8 +47,8 @@ log_file_name = "/var/log/cfn-init.log"
 log_format = '%(levelname)s [%(asctime)s] %(message)s'
 file_handler = logging.FileHandler(log_file_name)
 file_handler.setFormatter(logging.Formatter(log_format))
-logger.getLogger().addHandler(file_handler)
-logger.basicConfig(format=log_format, level=logging.DEBUG)
+logging.getLogger().addHandler(file_handler)
+logging.basicConfig(format=log_format, level=logging.DEBUG)
 
 description = " "
 parser = argparse.ArgumentParser(description=description)