Verbose logging: add config dump log() calls to Monitors, Media, Tools, Rsync, Fallback

This commit is contained in:
Gmer4Lfe
2026-06-04 21:37:53 -04:00
parent 369a9e6c19
commit 127b070f7b
33 changed files with 67 additions and 3 deletions
+6
View File
@@ -141,6 +141,9 @@ acquire_lock
# detect_hosts() sets MY_ID and aliases all host-specific vars used in this report
detect_hosts
log "$ICON_GEAR Config: profile=${DIGEST_PROFILE} day=${DIGEST_DAY}"
log "$ICON_GEAR Smart triggers: watchdog=${DIGEST_SMART_ON_WATCHDOG} fallback=${DIGEST_SMART_ON_FALLBACK} cert=${DIGEST_SMART_ON_CERT_WARN} bandwidth=${DIGEST_SMART_ON_BANDWIDTH}"
[[ "$DRY_RUN" == true ]] && warn "DRY RUN — report generated but no notification sent"
# ==============================================================================================
@@ -199,6 +202,7 @@ ISSUES=() # need attention
DIGEST_LINES=() # full report lines
# ── fallback State ────────────────────────────────────────────────────────────────────────────
log "Reading: fallback=$FALLBACK_STATE_FILE skip=$DOCKER_WATCHDOG_FAILED_FILE watchdog=$WATCHDOG_STATE_FILE sys=$SYS_WATCHDOG_STATE_FILE"
if [[ -f "$FALLBACK_STATE_FILE" ]]; then
FALLBACK_STATE=$(grep "^state=" "$FALLBACK_STATE_FILE" 2>/dev/null | cut -d= -f2)
if [[ -n "$FALLBACK_STATE" ]]; then
@@ -323,6 +327,8 @@ if [[ ${#CERT_MONITOR_DOMAINS[@]} -gt 0 ]] && command -v openssl >/dev/null 2>&1
elif [[ "$days_remaining" -le "${CERT_WARN_DAYS:-30}" ]]; then
CERT_ISSUES+=("$domain: ${days_remaining}d warning")
[[ "$DIGEST_SMART_ON_CERT_WARN" == true ]] && SHOULD_SEND=true
else
log "$ICON_CERT $domain: ${days_remaining}d remaining ✅"
fi
fi
done