From 8d7c0201456b7f9af6e91fea90354f4c3de323fe Mon Sep 17 00:00:00 2001 From: Satoshi Fujii Date: Fri, 22 Oct 2021 12:30:45 +0000 Subject: Fix log rotation issue Writing log to a single file from multiple processes is not supported by python logging. It causes making fragmented log files at log rotation and logs are mixed up. This change is to use different log files for each sub-process to help developers check log for a specific process easily. This change does not affect to pod log (stdout log). Signed-off-by: Satoshi Fujii Issue-ID: DCAEGEN2-2941 Change-Id: If8bcb2308863d1395a2c547d2e7b746301665fb0 --- miss_htbt_service/mod/trapd_vnf_table.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'miss_htbt_service/mod/trapd_vnf_table.py') diff --git a/miss_htbt_service/mod/trapd_vnf_table.py b/miss_htbt_service/mod/trapd_vnf_table.py index ff738f0..db6bd17 100644 --- a/miss_htbt_service/mod/trapd_vnf_table.py +++ b/miss_htbt_service/mod/trapd_vnf_table.py @@ -25,7 +25,7 @@ """ trapd_vnf_table verifies the successful creation of DB Tables. """ - +import logging import os import yaml import os.path as path @@ -39,8 +39,9 @@ import misshtbtd as db import cbs_polling as cbs prog_name = os.path.basename(__file__) -hb_properties_file = path.abspath(path.join(__file__, "../../config/hbproperties.yaml")) -_logger = get_logger.get_logger(__name__) +hb_properties_file = path.abspath(path.join(__file__, "../../config/hbproperties.yaml")) +_logger = logging.getLogger(__name__) + def hb_properties(): #Read the hbproperties.yaml for postgress and CBS related data -- cgit 1.2.3-korg