From 96d493e732cce6eb35fe0dcb4669ae5490f47e63 Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Thu, 22 Feb 2024 22:41:34 +0800 Subject: [PATCH] log --- scripts/lib/logging.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/lib/logging.sh b/scripts/lib/logging.sh index 18fe1c9a4..a6ec5ff22 100755 --- a/scripts/lib/logging.sh +++ b/scripts/lib/logging.sh @@ -213,15 +213,20 @@ openim::log::status() { done } + openim::log::success() { local V="${V:-0}" if [[ ${OPENIM_VERBOSE} < ${V} ]]; then return fi - timestamp=$(date +"%m%d %H:%M:%S") - echo_log -e "${COLOR_GREEN}[success ${timestamp}] ${COLOR_SUFFIX}==> " "$@" + local timestamp=$(date +"%m%d %H:%M:%S") + local reset_color='\033[0m' + echo_log -e "${COLOR_GREEN}[success ${timestamp}]${COLOR_SUFFIX}==> ${COLOR_GREEN}$@${reset_color}" } + + + function openim::log::test_log() { echo_log "test log" openim::log::info "openim::log::info"