From 6bdd5b0a1a4b9824a72f7c9150a9cc033bc001c1 Mon Sep 17 00:00:00 2001 From: deajan Date: Mon, 14 Nov 2016 22:01:44 +0100 Subject: [PATCH] Added color to TrapError output --- dev/ofunctions.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/ofunctions.sh b/dev/ofunctions.sh index a50f9dc..84add53 100644 --- a/dev/ofunctions.sh +++ b/dev/ofunctions.sh @@ -1,6 +1,6 @@ #### MINIMAL-FUNCTION-SET BEGIN #### -## FUNC_BUILD=2016111402 +## FUNC_BUILD=2016111403 ## BEGIN Generic bash functions written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr ## To use in a program, define the following variables: @@ -141,7 +141,7 @@ function Logger { ERROR_ALERT=true return elif [ "$level" == "WARN" ]; then - _Logger "$prefix\e[93m$value\e[0m" "$prefix$level:$value" "$level:$value" + _Logger "$prefix\e[33m$value\e[0m" "$prefix$level:$value" "$level:$value" WARN_ALERT=true return elif [ "$level" == "NOTICE" ]; then @@ -475,7 +475,7 @@ function TrapError { local code="${2:-1}" if [ $_SILENT == false ]; then - echo -e " /!\ ERROR in ${job}: Near line ${line}, exit code ${code}" + echo -e "\e[45m/!\ ERROR in ${job}: Near line ${line}, exit code ${code}" fi }