Skip to content

Commit

Permalink
swap logging levels for info and warn functions in logging.sh fixes #37
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmysun committed Jan 29, 2025
1 parent 664adba commit 51d05b8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions helpers/logging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ logging_debug() {
fi
}

logging_warn() {
logging_info() {
if [ "${ELL_LOG_LEVEL}" -ge 4 ]; then
echo "${LOG_STYLE_PUNC}[${LOG_STYLE_RESET}$(date +'%Y-%m-%d %H:%M:%S')${LOG_STYLE_PUNC}]${LOG_STYLE_RESET} $(basename "${0}") ${LOG_STYLE_WARN}WARN${LOG_STYLE_RESET} ${*}" >&2;
echo "${LOG_STYLE_PUNC}[${LOG_STYLE_RESET}$(date +'%Y-%m-%d %H:%M:%S')${LOG_STYLE_PUNC}]${LOG_STYLE_RESET} $(basename "${0}") ${LOG_STYLE_INFO}INFO${LOG_STYLE_RESET} ${*}" >&2;
fi
}

logging_info() {
logging_warn() {
if [ "${ELL_LOG_LEVEL}" -ge 4 ]; then
printf "%s" "${LOG_STYLE_PUNC}[${LOG_STYLE_RESET}$(date +'%Y-%m-%d %H:%M:%S')${LOG_STYLE_PUNC}]${LOG_STYLE_RESET} $(basename "${0}") " >&2;
fi
if [ "${ELL_LOG_LEVEL}" -ge 3 ]; then
echo "${LOG_STYLE_INFO}INFO${LOG_STYLE_RESET} ${*}" >&2;
echo "${LOG_STYLE_WARN}WARN${LOG_STYLE_RESET} ${*}" >&2;
fi
}

Expand Down

0 comments on commit 51d05b8

Please sign in to comment.