mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-05 11:52:10 +08:00
Script Refactoring
This commit is contained in:
parent
2fe30518e0
commit
0fcb5405de
@ -34,8 +34,8 @@ ret_val=$?
|
|||||||
if [ $ret_val -eq 0 ]; then
|
if [ $ret_val -eq 0 ]; then
|
||||||
echo "All services are running normally."
|
echo "All services are running normally."
|
||||||
else
|
else
|
||||||
openim::log::error "Some services are not running as expected. Details are as follows:"
|
openim::log::print_red "Some services are not running as expected. Details are as follows:"
|
||||||
openim::log::error "$result"
|
openim::log::print_red "$result"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@ -260,6 +260,13 @@ function openim::log::print_blue() {
|
|||||||
echo -e "\033[0;34m$1\033[0m"
|
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() {
|
openim::log::colorless() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user