CDB-3094 no hardcoded coloring output by creating a new log_warning function

This commit is contained in:
Raul Ochoa 2014-06-25 12:43:46 +02:00
parent 55efde5039
commit 84174c4f71

View File

@ -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"
}