mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-05-18 19:46:12 -04:00
Make warning about subscription ending a debug
This commit is contained in:
@@ -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<intmax_t>(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<intmax_t>(seconds_until_termination),
|
||||
renewal_enabled ? ", will renew" : " (renewal disabled, will re-subscribe)");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user