From 1db71c8427fd061712f7479ee9bb85bbda922aed Mon Sep 17 00:00:00 2001 From: "jingshun.tq" <35712518+Teingi@users.noreply.github.com> Date: Thu, 21 Nov 2024 20:55:43 +0800 Subject: [PATCH] Optimize the error log messages for the gather log function when the home_path configuration is incorrect (#569) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * observer.backup 和 backup_clean 收集场景支持分租户 * observer.backup 和 backup_clean 收集场景支持分租户 * observer.backup 和 backup_clean 收集场景支持分租户 * fix #563 --- handler/gather/gather_log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handler/gather/gather_log.py b/handler/gather/gather_log.py index 31bf07db..80ebf05c 100644 --- a/handler/gather/gather_log.py +++ b/handler/gather/gather_log.py @@ -306,7 +306,7 @@ def __handle_log_list(self, ssh, node, resp): resp["error"] = "Too many files {0} > {1}".format(len(log_list), self.file_number_limit) return log_list, resp elif len(log_list) <= 0: - self.stdio.warn('{0} The number of log files is {1}, The time range for file gather from {2} to {3}, and no eligible files were found.' " Please adjust the query time limit.".format(ip, len(log_list), self.from_time_str, self.to_time_str)) + self.stdio.warn('[{0}]: No log files that meet the conditions for the time period from {1} to {2} were found at the home_path: {3}'.format(ip, self.from_time_str, self.to_time_str, node.get("home_path"))) resp["skip"] = (True,) resp["error"] = "No files found" return log_list, resp