Added error only support in Logger

This commit is contained in:
deajan 2016-11-14 17:12:57 +01:00
parent 10f5fa9c0f
commit 7b9fde680e
1 changed files with 6 additions and 2 deletions

View File

@ -1,12 +1,14 @@
#### MINIMAL-FUNCTION-SET BEGIN #### #### MINIMAL-FUNCTION-SET BEGIN ####
## FUNC_BUILD=2016111301 ## FUNC_BUILD=2016111401
## BEGIN Generic bash functions written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr ## 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: ## To use in a program, define the following variables:
## PROGRAM=program-name ## PROGRAM=program-name
## INSTANCE_ID=program-instance-name ## INSTANCE_ID=program-instance-name
## _DEBUG=yes/no ## _DEBUG=yes/no
## _LOGGER_STDERR=True/False
## _LOGGER_ERR_ONLY=True/False
#TODO: Windows checks, check sendmail & mailsend #TODO: Windows checks, check sendmail & mailsend
@ -142,7 +144,9 @@ function Logger {
WARN_ALERT=true WARN_ALERT=true
return return
elif [ "$level" == "NOTICE" ]; then elif [ "$level" == "NOTICE" ]; then
_Logger "$prefix$value" if [ "$_LOGGER_ERR_ONLY" != True ]; then
_Logger "$prefix$value"
fi
return return
elif [ "$level" == "VERBOSE" ]; then elif [ "$level" == "VERBOSE" ]; then
if [ $_VERBOSE == true ]; then if [ $_VERBOSE == true ]; then