diff --git a/scripts-new/check.sh b/scripts-new/check.sh index 128c5fe83..f28efc405 100644 --- a/scripts-new/check.sh +++ b/scripts-new/check.sh @@ -34,8 +34,8 @@ ret_val=$? if [ $ret_val -eq 0 ]; then echo "All services are running normally." else - openim::log::error "Some services are not running as expected. Details are as follows:" - openim::log::error "$result" + openim::log::print_red "Some services are not running as expected. Details are as follows:" + openim::log::print_red "$result" exit 1 fi diff --git a/scripts-new/lib/logging.sh b/scripts-new/lib/logging.sh index f6f7b7e34..642ed1395 100644 --- a/scripts-new/lib/logging.sh +++ b/scripts-new/lib/logging.sh @@ -260,6 +260,13 @@ function openim::log::print_blue() { echo -e "\033[0;34m$1\033[0m" } +function openim::log::print_red() { + local current_time=$(date "+%Y-%m-%d %H:%M:%S %Z") + echo -e "[$current_time]" + echo -e "\033[0;31m$1\033[0m" +} + + openim::log::colorless() {