From b2463d2e08aa55b17b3b7ac36d9524ba953ef736 Mon Sep 17 00:00:00 2001 From: deajan Date: Tue, 2 Oct 2018 09:37:25 +0200 Subject: [PATCH] Added includes to batcher --- dev/common_batch.sh | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/dev/common_batch.sh b/dev/common_batch.sh index ed06067..a7fea8e 100755 --- a/dev/common_batch.sh +++ b/dev/common_batch.sh @@ -37,34 +37,7 @@ fi # No need to edit under this line ############################################################## -function _logger { - local value="${1}" # What to log - echo -e "$value" >> "$LOG_FILE" -} - -function Logger { - local value="${1}" # What to log - local level="${2}" # Log level: DEBUG, NOTICE, WARN, ERROR, CRITIAL - - prefix="$(date) - " - - if [ "$level" == "CRITICAL" ]; then - _logger "$prefix\e[41m$value\e[0m" - elif [ "$level" == "ERROR" ]; then - _logger "$prefix\e[91m$value\e[0m" - elif [ "$level" == "WARN" ]; then - _logger "$prefix\e[93m$value\e[0m" - elif [ "$level" == "NOTICE" ]; then - _logger "$prefix$value" - elif [ "$level" == "DEBUG" ]; then - if [ "$DEBUG" == "yes" ]; then - _logger "$prefix$value" - fi - else - _logger "\e[41mLogger function called without proper loglevel.\e[0m" - _logger "$prefix$value" - fi -} +include #### Logger SUBSET #### function CheckEnvironment { ## osync / obackup executable full path can be set here if it cannot be found on the system