From dae14f780e7584e0691e64dbe3298b945fc2c27b Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 13 Nov 2024 12:08:04 +0100 Subject: [PATCH] log/prefix --- bash/log.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bash/log.sh b/bash/log.sh index 069377e..1891609 100644 --- a/bash/log.sh +++ b/bash/log.sh @@ -9,19 +9,19 @@ LOG_LEVEL=${LOG_LEVEL_INFO} log_debug() { if [ "${LOG_LEVEL}" -ge "${LOG_LEVEL_DEBUG}" ]; then - echo "${@}" + echo "[DEBUG]" "${@}" fi } log_error() { if [ "${LOG_LEVEL}" -ge "${LOG_LEVEL_ERROR}" ]; then - echo "${@}" + echo "[ERROR]" "${@}" fi } log_fatal() { if [ "${LOG_LEVEL}" -ge "${LOG_LEVEL_FATAL}" ]; then - echo "${@}" + echo "[FATAL]" "${@}" fi } @@ -33,12 +33,12 @@ log_info() { log_trace() { if [ "${LOG_LEVEL}" -ge "${LOG_LEVEL_TRACE}" ]; then - echo "${@}" + echo "[TRACE]" "${@}" fi } log_warn() { if [ "${LOG_LEVEL}" -ge "${LOG_LEVEL_WARN}" ]; then - echo "${@}" + echo " [WARN]" "${@}" fi }