From b27ee4f8c1c47cc37797376a59552c61fc2e8abe Mon Sep 17 00:00:00 2001 From: deajan Date: Thu, 3 Mar 2016 16:26:52 +0100 Subject: [PATCH] =?UTF-8?q?Added=20loglevel=20to=20log=20files=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dev/debug_obackup.sh | 8 ++++---- dev/ofunctions.sh | 8 ++++---- obackup.sh | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dev/debug_obackup.sh b/dev/debug_obackup.sh index a37eead..bfb24a2 100755 --- a/dev/debug_obackup.sh +++ b/dev/debug_obackup.sh @@ -8,7 +8,7 @@ PROGRAM_VERSION=2.0-pre PROGRAM_BUILD=2016030301 IS_STABLE=no -## FUNC_BUILD=2016021803 +## FUNC_BUILD=2016030301 ## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr ## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode @@ -107,15 +107,15 @@ function Logger { # if [ "$level" == "CRITICAL" ]; then - _Logger "$prefix\e[41m$value\e[0m" "$prefix$value" + _Logger "$prefix\e[41m$level:$value\e[0m" "$prefix$value" ERROR_ALERT=1 return elif [ "$level" == "ERROR" ]; then - _Logger "$prefix\e[91m$value\e[0m" "$prefix$value" + _Logger "$prefix\e[91m$level:$value\e[0m" "$prefix$value" ERROR_ALERT=1 return elif [ "$level" == "WARN" ]; then - _Logger "$prefix\e[93m$value\e[0m" "$prefix$value" + _Logger "$prefix\e[93m$level:$value\e[0m" "$prefix$value" WARN_ALERT=1 return elif [ "$level" == "NOTICE" ]; then diff --git a/dev/ofunctions.sh b/dev/ofunctions.sh index 3eabf3f..a5ff7cb 100644 --- a/dev/ofunctions.sh +++ b/dev/ofunctions.sh @@ -1,4 +1,4 @@ -## FUNC_BUILD=2016021803 +## FUNC_BUILD=2016030301 ## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr ## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode @@ -97,15 +97,15 @@ function Logger { # if [ "$level" == "CRITICAL" ]; then - _Logger "$prefix\e[41m$value\e[0m" "$prefix$value" + _Logger "$prefix\e[41m$level:$value\e[0m" "$prefix$value" ERROR_ALERT=1 return elif [ "$level" == "ERROR" ]; then - _Logger "$prefix\e[91m$value\e[0m" "$prefix$value" + _Logger "$prefix\e[91m$level:$value\e[0m" "$prefix$value" ERROR_ALERT=1 return elif [ "$level" == "WARN" ]; then - _Logger "$prefix\e[93m$value\e[0m" "$prefix$value" + _Logger "$prefix\e[93m$level:$value\e[0m" "$prefix$value" WARN_ALERT=1 return elif [ "$level" == "NOTICE" ]; then diff --git a/obackup.sh b/obackup.sh index b258673..eb0f91e 100755 --- a/obackup.sh +++ b/obackup.sh @@ -8,7 +8,7 @@ PROGRAM_VERSION=2.0-pre PROGRAM_BUILD=2016030301 IS_STABLE=no -## FUNC_BUILD=2016021803 +## FUNC_BUILD=2016030301 ## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr ## type -p does not work on platforms other than linux (bash). If if does not work, always assume output is not a zero exitcode @@ -102,15 +102,15 @@ function Logger { # if [ "$level" == "CRITICAL" ]; then - _Logger "$prefix\e[41m$value\e[0m" "$prefix$value" + _Logger "$prefix\e[41m$level:$value\e[0m" "$prefix$value" ERROR_ALERT=1 return elif [ "$level" == "ERROR" ]; then - _Logger "$prefix\e[91m$value\e[0m" "$prefix$value" + _Logger "$prefix\e[91m$level:$value\e[0m" "$prefix$value" ERROR_ALERT=1 return elif [ "$level" == "WARN" ]; then - _Logger "$prefix\e[93m$value\e[0m" "$prefix$value" + _Logger "$prefix\e[93m$level:$value\e[0m" "$prefix$value" WARN_ALERT=1 return elif [ "$level" == "NOTICE" ]; then