|
|
|
@ -210,11 +210,26 @@ openim::log::status() {
|
|
|
|
|
if [[ ${OPENIM_VERBOSE} < ${V} ]]; then
|
|
|
|
|
return
|
|
|
|
|
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() {
|
|
|
|
|
local V="${V:-0}"
|
|
|
|
|
if [[ ${OPENIM_VERBOSE} < ${V} ]]; then
|
|
|
|
@ -227,7 +242,6 @@ openim::log::success() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function openim::log::test_log() {
|
|
|
|
|
echo_log "test log"
|
|
|
|
|
openim::log::info "openim::log::info"
|
|
|
|
|