Added FATAL_FAILURE to log_helpers. Do not send to APIS in case of FATAL_FAILURE.
This commit is contained in:
@@ -18,6 +18,7 @@ if [ "${log_helpers_sourced:-1}" = "1" ]; then # include only once
|
||||
readonly MAX_DEBUG_LEVEL=6
|
||||
|
||||
log_level=$INFO
|
||||
FATAL_FAILURE=false
|
||||
|
||||
set_dbg_level () {
|
||||
if [ $1 < $MAX_DEBUG_LEVEL ]; then
|
||||
@@ -83,6 +84,7 @@ if [ "${log_helpers_sourced:-1}" = "1" ]; then # include only once
|
||||
if [ $log_level -le $FATAL ]; then
|
||||
log "FATAL $*"
|
||||
log "exiting ..."
|
||||
FATAL_FAILURE=true
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
Reference in New Issue
Block a user