diff --git a/oedp/src/commands/info/info_cmd.py b/oedp/src/commands/info/info_cmd.py index d865adefbcf90a5a2bd868c2a957121a7822d65e..7d003c5051884c43eaabb5b9722f2a179dea795a 100644 --- a/oedp/src/commands/info/info_cmd.py +++ b/oedp/src/commands/info/info_cmd.py @@ -34,7 +34,7 @@ class InfoCmd: :return: 是否执行成功 """ - self.log.info(f'Running cmd info: project={self.project}') + self.log.debug(f'Running cmd info: project={self.project}') # 将日志等级调整为debug try: main = MainReader(self.project) name = main.get_name() diff --git a/oedp/src/commands/init/init_cmd.py b/oedp/src/commands/init/init_cmd.py index cec537882b4c34936385acda10f04730da1be61d..757424b6c918c0897157f1db9cb7b6945a6ec157 100644 --- a/oedp/src/commands/init/init_cmd.py +++ b/oedp/src/commands/init/init_cmd.py @@ -40,7 +40,7 @@ class InitCmd: :return: 是否执行成功 """ - self.log.info( + self.log.debug( f'Running cmd init: plugin={self.plugin}, source={self.source}, project={self.project}, force={self.force}') if not os.path.exists(self.source): self.log.error(f'Source path {self.source} does not exist') @@ -48,7 +48,7 @@ class InitCmd: tar_name = self.plugin + '.tar.gz' tar_path = os.path.join(self.source, tar_name) if not os.path.exists(tar_path): - self.log.info(f'Plugin {tar_name} does not exist in source {self.source}') + self.log.debug(f'Plugin {tar_name} does not exist in source {self.source}') # download download_success = False if not download_success: diff --git a/oedp/src/commands/list/list_cmd.py b/oedp/src/commands/list/list_cmd.py index 00882212b708fd3b2a6a73d222116d264f93436f..6385385cd61731a6f1edad11596fcededf793130 100644 --- a/oedp/src/commands/list/list_cmd.py +++ b/oedp/src/commands/list/list_cmd.py @@ -36,7 +36,7 @@ class ListCmd: :return: 是否执行成功 """ - self.log.info(f'Running cmd list: source={self.source}') + self.log.debug(f'Running cmd list: source={self.source}') if not os.path.isdir(self.source): self.log.error(f'{self.source} is not a directory') return False diff --git a/oedp/src/commands/run/run_action.py b/oedp/src/commands/run/run_action.py index a76d5630cee24c756437e5ad9a1e21bcf994c47e..603b045405b3bd07df40e45efc1517a35007d64b 100644 --- a/oedp/src/commands/run/run_action.py +++ b/oedp/src/commands/run/run_action.py @@ -37,15 +37,15 @@ class RunAction: :return: 是否执行成功 """ - self.log.info(f'Running {self.action} action for {self.project}') + self.log.debug(f'Running {self.action} action for {self.project}') for task in self.tasks: if not isinstance(task, dict): self.log.error(f'Unrecognized task: {task}') return False if 'name' in task: - self.log.info(f'Running task: {task["name"]}') + self.log.debug(f'Running task: {task["name"]}') else: - self.log.info(f'Running task: No Name Task') + self.log.debug(f'Running task: No Name Task') if 'playbook' in task: if not self._run_playbook(task, self.project): return False @@ -70,7 +70,7 @@ class RunAction: cmd.extend(['-e', f'@{variables}']) if 'scope' in task and task['scope'] != 'all': cmd.extend(['--limit', task['scope']]) - self.log.info(f'Executing cmd: {cmd}') + self.log.debug(f'Executing cmd: {cmd}') out, err, ret = CommandExecutor.run_single_cmd(cmd, print_on_console=True) if ret: if err: diff --git a/oedp/src/commands/run/run_cmd.py b/oedp/src/commands/run/run_cmd.py index 66f8659aa6531e274cfd16b744b1e513ea15cf08..9e92a922bf059f697bbac5cbf5b6af5838730ca0 100644 --- a/oedp/src/commands/run/run_cmd.py +++ b/oedp/src/commands/run/run_cmd.py @@ -35,7 +35,7 @@ class RunCmd: :return: 是否执行成功 """ - self.log.info(f'Running cmd run: action={self.action}, project={self.project}') + self.log.debug(f'Running cmd run: action={self.action}, project={self.project}') try: main = MainReader(self.project) action = main.get_action_detail(self.action) diff --git a/oedp/src/config/log.conf b/oedp/src/config/log.conf index 5ee7b03bff0259bb059059fb33e64a3cfb5d1233..9a5f6efbc0d0bf4f306df8849ba5d1ea3f6a111f 100644 --- a/oedp/src/config/log.conf +++ b/oedp/src/config/log.conf @@ -1,12 +1,12 @@ [log] -log_level=INFO +log_level = DEBUG [console_handler] log_level = INFO log_format = [ %%(levelname)s ] - [%%(name)s] - %%(message)s [file_handler] -log_level = INFO +log_level = DEBUG log_format = %%(asctime)s [ %%(levelname)s ] - [%%(filename)s] [line=%%(lineno)s] - [%%(name)s] - %%(message)s log_file_path = /var/oedp/log/oedp.log file_max_size = 1024000