diff --git a/ceres/function/util.py b/ceres/function/util.py index 433db09028b8d0c0a4a854da7bd1e637fd0db3e6..a226c5f0b0c1314b38632a9fb3b9b7cb8090dc50 100644 --- a/ceres/function/util.py +++ b/ceres/function/util.py @@ -59,7 +59,7 @@ def validate_data(data: Any, schema: dict) -> bool: validate(instance=data, schema=schema) return True except ValidationError as e: - LOGGER.error(e.message) + LOGGER.error(f'Failed to validate data, error:{e.message}') return False @@ -131,7 +131,7 @@ def load_gopher_config(gopher_config_path: str) -> AttrDict: with open(gopher_config_path, 'r', encoding='utf8') as file: cfg = load(file) except FileNotFoundError: - LOGGER.error(f"Can't find file {gopher_config_path}.") + LOGGER.error(f'Failed tofind file {gopher_config_path}.') return AttrDict() except ConfigParseError: LOGGER.error(f'Failed to parse file {gopher_config_path}.') @@ -151,7 +151,7 @@ def plugin_status_judge(plugin_name: str) -> str: """ service_name = INFORMATION_ABOUT_RPM_SERVICE.get(plugin_name, {}).get('service_name') if service_name is None: - LOGGER.warning(f"Fail to get service name about {plugin_name}") + LOGGER.warning(f'Failed to get service name about {plugin_name}') return "" return_code, stdout, _ = execute_shell_command(f"systemctl status {service_name}|grep Active")