This commit is contained in:
Marc Beninca 2024-11-12 07:20:25 +01:00
parent 3d784b81c4
commit 95828fe06c
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -5,16 +5,40 @@ LOG_LEVEL_INFO=3
LOG_LEVEL_DEBUG=4
LOG_LEVEL_TRACE=5
LOG_LEVEL=${LOG_LEVEL_WARN}
LOG_LEVEL=${LOG_LEVEL_INFO}
log_fatal() { [ "${LOG_LEVEL}" -ge "${LOG_LEVEL_FATAL}" ] && echo "${@}" ; }
log_debug() {
if [ "${LOG_LEVEL}" -ge "${LOG_LEVEL_DEBUG}" ]; then
echo "${@}"
fi
}
log_error() { [ "${LOG_LEVEL}" -ge "${LOG_LEVEL_ERROR}" ] && echo "${@}" ; }
log_error() {
if [ "${LOG_LEVEL}" -ge "${LOG_LEVEL_ERROR}" ]; then
echo "${@}"
fi
}
log_warn() { [ "${LOG_LEVEL}" -ge "${LOG_LEVEL_WARN}" ] && echo "${@}" ; }
log_fatal() {
if [ "${LOG_LEVEL}" -ge "${LOG_LEVEL_FATAL}" ]; then
echo "${@}"
fi
}
log_info() { [ "${LOG_LEVEL}" -ge "${LOG_LEVEL_INFO}" ] && echo "${@}" ; }
log_info() {
if [ "${LOG_LEVEL}" -ge "${LOG_LEVEL_INFO}" ]; then
echo "${@}"
fi
}
log_debug() { [ "${LOG_LEVEL}" -ge "${LOG_LEVEL_DEBUG}" ] && echo "${@}" ; }
log_trace() {
if [ "${LOG_LEVEL}" -ge "${LOG_LEVEL_TRACE}" ]; then
echo "${@}"
fi
}
log_trace() { [ "${LOG_LEVEL}" -ge "${LOG_LEVEL_TRACE}" ] && echo "${@}" ; }
log_warn() {
if [ "${LOG_LEVEL}" -ge "${LOG_LEVEL_WARN}" ]; then
echo "${@}"
fi
}