Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions logging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -769,9 +769,10 @@ _parse_config_file() {

# Convert log level name to numeric value (internal)
_get_log_level_value() {
local level_name="$1"
local level_name
level_name="$(printf '%s' "$1" | tr '[:lower:]' '[:upper:]')"
local line_num="${2:-}"
case "${level_name^^}" in
case "${level_name}" in
"DEBUG")
echo "$LOG_LEVEL_DEBUG"
;;
Expand Down Expand Up @@ -1898,13 +1899,14 @@ log_to_journal() {
return 1
fi

local level_name="$1"
local level_name
level_name="$(printf '%s' "$1" | tr '[:lower:]' '[:upper:]')"
shift
local message="$*"

# Validate and normalise the level name to the canonical form used by _log_message
local canonical_level
case "${level_name^^}" in
case "${level_name}" in
DEBUG) canonical_level="DEBUG" ;;
INFO) canonical_level="INFO" ;;
NOTICE) canonical_level="NOTICE" ;;
Expand Down
Loading