|
|
@ -254,21 +254,30 @@ function openim::log::test_log() {
|
|
|
|
|
|
|
|
|
|
|
|
# openim::log::test_log
|
|
|
|
# openim::log::test_log
|
|
|
|
|
|
|
|
|
|
|
|
function openim::log::print_blue() {
|
|
|
|
|
|
|
|
|
|
|
|
function openim::log::print_blue_two_line() {
|
|
|
|
local current_time=$(date "+%Y-%m-%d %H:%M:%S %Z")
|
|
|
|
local current_time=$(date "+%Y-%m-%d %H:%M:%S %Z")
|
|
|
|
echo -e "[$current_time]"
|
|
|
|
echo -e "[$current_time]"
|
|
|
|
echo -e "\033[0;34m$1\033[0m"
|
|
|
|
echo -e "\033[0;34m$1\033[0m"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function openim::log::print_blue() {
|
|
|
|
|
|
|
|
local current_time=$(date "+%Y-%m-%d %H:%M:%S %Z")
|
|
|
|
|
|
|
|
echo -e "[$current_time] \033[0;34m$1\033[0m"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function openim::log::print_red() {
|
|
|
|
function openim::log::print_red() {
|
|
|
|
local current_time=$(date "+%Y-%m-%d %H:%M:%S %Z")
|
|
|
|
local current_time=$(date "+%Y-%m-%d %H:%M:%S %Z")
|
|
|
|
echo -e "[$current_time]"
|
|
|
|
echo -e "[$current_time] \033[0;31m$1\033[0m"
|
|
|
|
echo -e "\033[0;31m$1\033[0m"
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
openim::log::colorless() {
|
|
|
|
openim::log::colorless() {
|
|
|
|
local V="${V:-0}"
|
|
|
|
local V="${V:-0}"
|
|
|
|
if [[ ${OPENIM_VERBOSE} < ${V} ]]; then
|
|
|
|
if [[ ${OPENIM_VERBOSE} < ${V} ]]; then
|
|
|
|