From: Angus Salkeld Date: Thu, 26 Apr 2012 13:15:39 +0000 (+1000) Subject: Fix the cfn logging X-Git-Tag: 2014.1~1923^2~3 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=51242e0802faad4c5c55765b68cfdd73c93bdf3b;p=openstack-build%2Fheat-build.git Fix the cfn logging Signed-off-by: Angus Salkeld --- diff --git a/heat/cfntools/cfn-hup b/heat/cfntools/cfn-hup index 44f62226..757f73d3 100755 --- a/heat/cfntools/cfn-hup +++ b/heat/cfntools/cfn-hup @@ -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: diff --git a/heat/cfntools/cfn-init b/heat/cfntools/cfn-init index 37e7a911..6eb9715b 100755 --- a/heat/cfntools/cfn-init +++ b/heat/cfntools/cfn-init @@ -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)