From 309db2cb76768644e02fd7a55f60ef80a4efcd39 Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Tue, 2 Apr 2024 17:31:22 +0800 Subject: [PATCH] Script Refactoring --- scripts-new/lib/logging.sh | 4 +--- scripts-new/stop.sh | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts-new/lib/logging.sh b/scripts-new/lib/logging.sh index b2cf8e307..7e1cf9ba2 100644 --- a/scripts-new/lib/logging.sh +++ b/scripts-new/lib/logging.sh @@ -284,9 +284,7 @@ function openim::log::print_red() { echo -e "[$current_time] \033[0;31m$1\033[0m" } -function openim::log::print_red_two_lines() { - local current_time=$(date "+%Y-%m-%d %H:%M:%S %Z") - echo -e "[$current_time]" +function openim::log::print_red_no_time_stamp() { echo -e "\033[0;31m$1\033[0m" } diff --git a/scripts-new/stop.sh b/scripts-new/stop.sh index 9772b3cd0..878583db8 100644 --- a/scripts-new/stop.sh +++ b/scripts-new/stop.sh @@ -16,7 +16,7 @@ result=$(check_binaries_stop) ret_val=$? if [ $ret_val -ne 0 ]; then openim::log::print_red "Some services have not been stopped, details are as follows:" - openim::log::print_red_two_lines "$result" + openim::log::print_red_no_time_stamp "$result" exit 1 fi