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
This commit is contained in:
parent
818fcad4e4
commit
2b2b5719c7
|
@ -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[
|
||||
|
|
Loading…
Reference in New Issue