Changing log facility to decouple agent service
This commit changes the logging facility used by the pci-irq-affinity-agent from syslog to stdout so that it can be turn into a container and be executed during the stx-openstack application apply process. Depends-on: TBD Story: TBD Task: TBD Signed-off-by: Heitor Matsui <HeitorVieira.Matsui@windriver.com> Change-Id: I7680e39de734e16affebff893df21c6b5089dc76
This commit is contained in:
parent
b78e1e8513
commit
3d36ca8e8d
|
@ -195,7 +195,7 @@ def process_main():
|
|||
sys.exit(200)
|
||||
|
||||
finally:
|
||||
LOG.error("proces_main finalized!!!")
|
||||
LOG.error("process_main finalized!!!")
|
||||
if openstack_enabled == 'true':
|
||||
novaClient.close_libvirt_connect()
|
||||
audit_srv.tg.stop()
|
||||
|
|
|
@ -12,17 +12,14 @@
|
|||
""" Define Logger class for this agent"""
|
||||
|
||||
import logging
|
||||
import logging.handlers
|
||||
|
||||
_syslog_facility = 'local1'
|
||||
import sys
|
||||
|
||||
|
||||
LOG = logging.getLogger("pci-interrupt-affinity")
|
||||
formatter = logging.Formatter("%(asctime)s %(threadName)s[%(process)d] "
|
||||
"%(name)s.%(pathname)s.%(lineno)d - %(levelname)s "
|
||||
"%(message)s")
|
||||
handler = logging.handlers.SysLogHandler(address='/dev/log',
|
||||
facility=_syslog_facility)
|
||||
handler = logging.StreamHandler(stream=sys.stdout)
|
||||
handler.setFormatter(formatter)
|
||||
LOG.addHandler(handler)
|
||||
LOG.setLevel(logging.INFO)
|
||||
|
|
Loading…
Reference in New Issue