mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-05 21:02:11 +08:00
Optimizing scripts
This commit is contained in:
parent
2bf3c781eb
commit
48cb270a92
@ -210,11 +210,26 @@ openim::log::status() {
|
|||||||
if [[ ${OPENIM_VERBOSE} < ${V} ]]; then
|
if [[ ${OPENIM_VERBOSE} < ${V} ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
timestamp=$(date +"[%Y-%m-%d %H:%M:%S %Z]")
|
|
||||||
echo_log -e "${COLOR_BLUE}${timestamp} ${1} ${COLOR_BLUE}$@${reset_color}"
|
local COLOR_BLUE="\033[0;34m"
|
||||||
|
local COLOR_RESET="\033[0m"
|
||||||
|
|
||||||
|
local timestamp=$(date +"[%Y-%m-%d %H:%M:%S %Z]")
|
||||||
|
|
||||||
|
echo_log() {
|
||||||
|
echo -e "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
echo_log "${COLOR_BLUE}${timestamp} ${1}${COLOR_RESET}"
|
||||||
|
shift
|
||||||
|
for message; do
|
||||||
|
echo_log "${COLOR_BLUE}${message}${COLOR_RESET}"
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
openim::log::success() {
|
openim::log::success() {
|
||||||
local V="${V:-0}"
|
local V="${V:-0}"
|
||||||
if [[ ${OPENIM_VERBOSE} < ${V} ]]; then
|
if [[ ${OPENIM_VERBOSE} < ${V} ]]; then
|
||||||
@ -227,7 +242,6 @@ openim::log::success() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function openim::log::test_log() {
|
function openim::log::test_log() {
|
||||||
echo_log "test log"
|
echo_log "test log"
|
||||||
openim::log::info "openim::log::info"
|
openim::log::info "openim::log::info"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user