From 0093c732dc866924ae97bb8bf1f525bdc2f2482a Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Mon, 13 Dec 2021 19:01:55 +0100 Subject: [PATCH] Add configurable default log level Signed-off-by: Knut Ahlers --- bin/script_framework.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/script_framework.sh b/bin/script_framework.sh index 3c898e2..b2759a4 100644 --- a/bin/script_framework.sh +++ b/bin/script_framework.sh @@ -41,7 +41,8 @@ function log_level_matches() { [warning]=2 [error]=3 ) - [ ${log_levels[${LOG_LEVEL:-UNDEF}]:-1} -le ${1} ] && return 0 || return 1 + local fb_ll=${log_levels[${DEFAULT_LOG_LEVEL:-info}]} + [ ${log_levels[${LOG_LEVEL:-UNDEF}]:-${fb_ll}} -le ${1} ] && return 0 || return 1 } function step() {