From a6180ecd657bbc2ceeaff1144545dbe2951ef983 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 11 Nov 2024 20:33:23 +0100 Subject: [PATCH] log --- bash/log.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bash/log.sh b/bash/log.sh index f7d325e..5bb7906 100644 --- a/bash/log.sh +++ b/bash/log.sh @@ -7,14 +7,14 @@ LOG_LEVEL_TRACE=5 LOG_LEVEL=${LOG_LEVEL_WARN} -function log_fatal { [ ${LOG_LEVEL} -ge ${LOG_LEVEL_FATAL} ] && echo "${@}" ; } +log_fatal() { [ "${LOG_LEVEL}" -ge "${LOG_LEVEL_FATAL}" ] && echo "${@}" ; } -function log_error { [ ${LOG_LEVEL} -ge ${LOG_LEVEL_ERROR} ] && echo "${@}" ; } +log_error() { [ "${LOG_LEVEL}" -ge "${LOG_LEVEL_ERROR}" ] && echo "${@}" ; } -function log_warn { [ ${LOG_LEVEL} -ge ${LOG_LEVEL_WARN} ] && echo "${@}" ; } +log_warn() { [ "${LOG_LEVEL}" -ge "${LOG_LEVEL_WARN}" ] && echo "${@}" ; } -function log_info { [ ${LOG_LEVEL} -ge ${LOG_LEVEL_INFO} ] && echo "${@}" ; } +log_info() { [ "${LOG_LEVEL}" -ge "${LOG_LEVEL_INFO}" ] && echo "${@}" ; } -function log_debug { [ ${LOG_LEVEL} -ge ${LOG_LEVEL_DEBUG} ] && echo "${@}" ; } +log_debug() { [ "${LOG_LEVEL}" -ge "${LOG_LEVEL_DEBUG}" ] && echo "${@}" ; } -function log_trace { [ ${LOG_LEVEL} -ge ${LOG_LEVEL_TRACE} ] && echo "${@}" ; } +log_trace() { [ "${LOG_LEVEL}" -ge "${LOG_LEVEL_TRACE}" ] && echo "${@}" ; }