From 2b2b5719c75076132b251aa811796feffed82880 Mon Sep 17 00:00:00 2001 From: Jui Chandwaskar Date: Thu, 26 Apr 2018 15:12:43 +0200 Subject: [PATCH] Fix type error in monasca agent Observed TypeError in forwarder and collector logs while executing monasca agent. Due to which monasca agent failed to start. Added line continuation character to fix the error. Change-Id: Ibaf148ca6cf7b9cb73ceabacccf7aa519897af72 Task: 14449 Story: 2001922 --- monasca_agent/common/util.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/monasca_agent/common/util.py b/monasca_agent/common/util.py index 220b6b8d..a2147b21 100644 --- a/monasca_agent/common/util.py +++ b/monasca_agent/common/util.py @@ -601,8 +601,8 @@ def load_check_directory(): def initialize_logging(logger_name): try: - log_format = '%%(asctime)s | %%(levelname)s | %s | %%(name)s(%%(filename)s:%%(lineno)s) ' - '| %%(message)s' % logger_name + log_format = '%%(asctime)s | %%(levelname)s | %s | %%(name)s(%%(filename)s:%%(lineno)s) ' \ + '| %%(message)s' % logger_name log_date_format = "%Y-%m-%d %H:%M:%S %Z" config = configuration.Config() logging_config = config.get_config(sections='Logging') @@ -635,8 +635,8 @@ def initialize_logging(logger_name): # set up syslog if logging_config['log_to_syslog']: try: - syslog_format = '%s[%%(process)d]: %%(levelname)s (%%(filename)s:%%(lineno)s): ' - '%%(message)s' % logger_name + syslog_format = '%s[%%(process)d]: %%(levelname)s (%%(filename)s:%%(lineno)s): ' \ + '%%(message)s' % logger_name from logging.handlers import SysLogHandler if logging_config['syslog_host'] is not None and logging_config[