feat(log): Add 'SUCCESS' status

Tag successfully updated entries with a 'SUCCESS' tag instead of 'OK' for better log filtering and to allow for logwatch reporting.
This commit is contained in:
2026-07-25 03:45:44 -06:00
parent d20be3e602
commit 9654bf7472
+1 -1
View File
@@ -619,7 +619,7 @@ while [ -n "$dnsRecordsToUpdate" ] && [ "$dnsRecordsToUpdate" != "$dnsSeparator"
# note update success or failure # note update success or failure
cfSuccess="$(printf "%s" "$cfResult" | jq '.success')" cfSuccess="$(printf "%s" "$cfResult" | jq '.success')"
if [ "$cfSuccess" = "true" ]; then if [ "$cfSuccess" = "true" ]; then
writeLog "The IP address for '${record}' successfully updated" "info" "ok" "ddns" writeLog "The IP address for '${record}' successfully updated" "info" "success" "ddns"
else else
listCFErrors "$cfResult" "ddns" listCFErrors "$cfResult" "ddns"
writeLog "Unable to update the IP address for '${record}'" "err" "fail" "ddns" writeLog "Unable to update the IP address for '${record}'" "err" "fail" "ddns"