refactor(logger): Rename writeJournalLog function

Rename from 'writeJournalLog' to 'writeJournalDLog' for specificity.
This commit is contained in:
2026-07-22 23:19:51 -06:00
parent ce1ab86d22
commit 56a5ad59fe
+6 -6
View File
@@ -102,7 +102,7 @@ writeJsonLog() {
} }
# $1: message, $2: level, $3: status, $4: operation, $5: code # $1: message, $2: level, $3: status, $4: operation, $5: code
writeJournalLog() { writeJournalDLog() {
# translate error levels # translate error levels
if [ -z "$2" ]; then if [ -z "$2" ]; then
LOG_LEVEL=1 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" "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 writeJsonLog "This is a test message" "alert" "testing" 10 # generate this message at the 'alert' level with all parameters set
elif [ "$1" = "journal" ]; then elif [ "$1" = "journal" ]; then
writeJournalLog # this will generate a generic error message writeJournalDLog # this will generate a generic error message
writeJournalLog "This is a test message" # generate this message at the default level with the default code writeJournalDLog "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 writeJournalDLog "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 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
writeJournalLog "This is a test message" "alert" "testing" 10 # generate this message at the 'alert' level with all parameters set writeJournalDLog "This is a test message" "alert" "testing" 10 # generate this message at the 'alert' level with all parameters set
else else
printf "\nPlease specify either 'json' or 'journal' after the script name. Exiting.\n\n" printf "\nPlease specify either 'json' or 'journal' after the script name. Exiting.\n\n"
exit 1 exit 1