CDB-3094 no hardcoded coloring output by creating a new log_warning function
This commit is contained in:
parent
55efde5039
commit
84174c4f71
@ -50,7 +50,8 @@ function sql() {
|
||||
|
||||
if [[ ${CODERESULT} -ne 0 ]]
|
||||
then
|
||||
echo -e "FAILED TO EXECUTE QUERY: \033[0;33m${QUERY}\033[0m"
|
||||
echo -n "FAILED TO EXECUTE QUERY: "
|
||||
log_warning "${QUERY}"
|
||||
if [[ "$3" != "fails" ]]
|
||||
then
|
||||
log_error "${QUERY}"
|
||||
@ -91,6 +92,10 @@ function log_debug() {
|
||||
_log "1;32m" "> $1"
|
||||
}
|
||||
|
||||
function log_warning() {
|
||||
_log "0;33m" "$1"
|
||||
}
|
||||
|
||||
function _log() {
|
||||
echo -e "\033[$1$2\033[0m"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user