From 56a5ad59fef49055df39c64f53ba74ad24878017 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Wed, 22 Jul 2026 23:19:51 -0600 Subject: [PATCH] refactor(logger): Rename writeJournalLog function Rename from 'writeJournalLog' to 'writeJournalDLog' for specificity. --- logger.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/logger.sh b/logger.sh index 503c5b8..8a9ff05 100644 --- a/logger.sh +++ b/logger.sh @@ -102,7 +102,7 @@ writeJsonLog() { } # $1: message, $2: level, $3: status, $4: operation, $5: code -writeJournalLog() { +writeJournalDLog() { # translate error levels if [ -z "$2" ]; then LOG_LEVEL=1 @@ -179,11 +179,11 @@ if [ "$1" = "json" ]; then writeJsonLog "This is a test message" "error" "testing" # generate this message at the 'error' level, part of a 'test' operation, and with the default code writeJsonLog "This is a test message" "alert" "testing" 10 # generate this message at the 'alert' level with all parameters set elif [ "$1" = "journal" ]; then - writeJournalLog # this will generate a generic error message - writeJournalLog "This is a test message" # generate this message at the default level with the default code - writeJournalLog "This is a test message" "warning" # generate this message at the 'warning' level with the default code - writeJournalLog "This is a test message" "error" "testing" # generate this message at the 'error' level as part of a 'test' operation, and with the default code - writeJournalLog "This is a test message" "alert" "testing" 10 # generate this message at the 'alert' level with all parameters set + writeJournalDLog # this will generate a generic error message + writeJournalDLog "This is a test message" # generate this message at the default level with the default code + writeJournalDLog "This is a test message" "warning" # generate this message at the 'warning' level with the default code + writeJournalDLog "This is a test message" "error" "testing" # generate this message at the 'error' level as part of a 'test' operation, and with the default code + writeJournalDLog "This is a test message" "alert" "testing" 10 # generate this message at the 'alert' level with all parameters set else printf "\nPlease specify either 'json' or 'journal' after the script name. Exiting.\n\n" exit 1