From 07f307e155015cac489f25a31cff6e960cbf1024 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sat, 31 Jan 2026 16:52:03 -0500 Subject: [PATCH] Make warning about subscription ending a debug --- src/zm_monitor_onvif.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/zm_monitor_onvif.cpp b/src/zm_monitor_onvif.cpp index 26cb16577..053bd06cc 100644 --- a/src/zm_monitor_onvif.cpp +++ b/src/zm_monitor_onvif.cpp @@ -935,17 +935,14 @@ void ONVIF::log_subscription_timing(const char* context) { context, SystemTimePointToString(subscription_termination_time).c_str(), seconds_until_termination, SystemTimePointToString(next_renewal_time).c_str(), - seconds_until_renewal); - - // Warn if we're getting close to termination and renewal is enabled - // If renewal is disabled, this is expected behavior - just log at debug level + static_cast(seconds_until_renewal)); + // Log at debug level when we're getting close to termination + // This is informational - actual renewal failures are logged as Error/Warning in Renew() + // If renewal is enabled, we will renew or re-subscribe. If disabled, we will re-subscribe. if (seconds_until_termination < ONVIF_RENEWAL_ADVANCE_SECONDS && seconds_until_termination > 0) { - if (renewal_enabled) { - Warning("ONVIF: Subscription terminating soon! Only %ld seconds remaining", seconds_until_termination); - } else { - Debug(1, "ONVIF: Subscription terminating in %ld seconds (renewal disabled, will re-subscribe)", - seconds_until_termination); - } + Debug(1, "ONVIF: Subscription terminating in %jd seconds%s", + static_cast(seconds_until_termination), + renewal_enabled ? ", will renew" : " (renewal disabled, will re-subscribe)"); } }