From: garciadeblas Date: Wed, 11 Sep 2024 12:28:38 +0000 (+0200) Subject: Use common logger for all new gitops operations X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F51%2F14551%2F1;p=osm%2FLCM.git Use common logger for all new gitops operations Change-Id: I48bb7b2bc74432a8a5ae2c1a20e2ba375a825653 Signed-off-by: garciadeblas --- diff --git a/osm_lcm/k8s.py b/osm_lcm/k8s.py index 0e9a5c4..c48228e 100644 --- a/osm_lcm/k8s.py +++ b/osm_lcm/k8s.py @@ -35,7 +35,7 @@ class ClusterLcm(LcmBase): :return: None """ - self.logger = logging.getLogger("lcm.clusterlcm") + self.logger = logging.getLogger("lcm.gitops") self.lcm_tasks = lcm_tasks self.odu = odu_workflows.OduWorkflow(msg, self.lcm_tasks, config) self.regist = vim_sdn.K8sClusterLcm(msg, self.lcm_tasks, config) @@ -529,7 +529,7 @@ class CloudCredentialsLcm(LcmBase): :return: None """ - self.logger = logging.getLogger("lcm.cloud_credentials") + self.logger = logging.getLogger("lcm.gitops") self.lcm_tasks = lcm_tasks self.odu = odu_workflows.OduWorkflow(msg, self.lcm_tasks, config) @@ -615,7 +615,7 @@ class K8sAppLcm(LcmBase): :return: None """ - self.logger = logging.getLogger("lcm.clusterlcm") + self.logger = logging.getLogger("lcm.gitops") self.lcm_tasks = lcm_tasks self.odu = odu_workflows.OduWorkflow(msg, self.lcm_tasks, config) @@ -729,7 +729,7 @@ class K8sResourceLcm(LcmBase): :return: None """ - self.logger = logging.getLogger("lcm.clusterlcm") + self.logger = logging.getLogger("lcm.gitops") self.lcm_tasks = lcm_tasks self.odu = odu_workflows.OduWorkflow(msg, self.lcm_tasks, config) @@ -844,7 +844,7 @@ class K8sInfraControllerLcm(LcmBase): :return: None """ - self.logger = logging.getLogger("lcm.clusterlcm") + self.logger = logging.getLogger("lcm.gitops") self.lcm_tasks = lcm_tasks self.odu = odu_workflows.OduWorkflow(msg, self.lcm_tasks, config) @@ -958,7 +958,7 @@ class K8sInfraConfigLcm(LcmBase): :return: None """ - self.logger = logging.getLogger("lcm.clusterlcm") + self.logger = logging.getLogger("lcm.gitops") self.lcm_tasks = lcm_tasks self.odu = odu_workflows.OduWorkflow(msg, self.lcm_tasks, config) @@ -1073,7 +1073,7 @@ class OkaLcm(LcmBase): :return: None """ - self.logger = logging.getLogger("lcm.oka") + self.logger = logging.getLogger("lcm.gitops") self.lcm_tasks = lcm_tasks self.odu = odu_workflows.OduWorkflow(msg, self.lcm_tasks, config) @@ -1241,7 +1241,7 @@ class KsuLcm(LcmBase): :return: None """ - self.logger = logging.getLogger("lcm.ksu") + self.logger = logging.getLogger("lcm.gitops") self.lcm_tasks = lcm_tasks self.odu = odu_workflows.OduWorkflow(msg, self.lcm_tasks, config) diff --git a/osm_lcm/lcm.py b/osm_lcm/lcm.py index 77c3d82..c685ed1 100644 --- a/osm_lcm/lcm.py +++ b/osm_lcm/lcm.py @@ -149,7 +149,7 @@ class Lcm: self.logger.setLevel(self.main_config.globalConfig.loglevel) # logging other modules - for logger in ("message", "database", "storage", "tsdb"): + for logger in ("message", "database", "storage", "tsdb", "gitops"): logger_config = self.main_config.to_dict()[logger] logger_module = logging.getLogger(logger_config["logger_name"]) if logger_config["logfile"]: diff --git a/osm_lcm/odu_workflows.py b/osm_lcm/odu_workflows.py index bb3fce2..b882706 100644 --- a/osm_lcm/odu_workflows.py +++ b/osm_lcm/odu_workflows.py @@ -28,7 +28,7 @@ class OduWorkflow(LcmBase): :return: None """ - self.logger = logging.getLogger("lcm.odu") + self.logger = logging.getLogger("lcm.gitops") self.lcm_tasks = lcm_tasks self.logger.info("Msg: {} lcm_tasks: {} ".format(msg, lcm_tasks))