fn log_peer_set_size(&mut self) {
        let ready_services_len = self.ready_services.len();
        let unready_services_len = self.unready_services.len();
        trace!(ready_peers = ?ready_services_len, unready_peers = ?unready_services_len);

        if ready_services_len > 0 {
            return;
        }

        // These logs are designed to be human-readable in a terminal, at the
        // default Zebra log level. If you need to know the peer set size for
        // every request, use the trace-level logs, or the metrics exporter.
        if let Some(last_peer_log) = self.last_peer_log {
            // Avoid duplicate peer set logs
            if Instant::now().duration_since(last_peer_log).as_secs() < 60 {
                return;
            }
        } else {
            // Suppress initial logs until the peer set has started up.
            // There can be multiple initial requests before the first peer is
            // ready.
            self.last_peer_log = Some(Instant::now());
            return;
        }

        self.last_peer_log = Some(Instant::now());

        let address_metrics = self.address_metrics.borrow();
        if unready_services_len == 0 {
            warn!(
                ?address_metrics,
                "network request with no peer connections. Hint: check your network connection"
            );
        } else {
            info!(?address_metrics, "network request with no ready peers: finding more peers, waiting for {} peers to answer requests",
                  unready_services_len);
        }
    }
/// Logs the peer set size.
Logs the peer set size.
Logs the peer set size .
fn log_peer_set_size(&mut self) {
        let ready_services_len = self.ready_services.len();
        let unready_services_len = self.unready_services.len();
        trace!(ready_peers = ?ready_services_len, unready_peers = ?unready_services_len);
        if ready_services_len > 0 {
            return;
        }
        // These logs are designed to be human-readable in a terminal, at the
        // default Zebra log level. If you need to know the peer set size for
        // every request, use the trace-level logs, or the metrics exporter.
        if let Some(last_peer_log) = self.last_peer_log {
            // Avoid duplicate peer set logs
            if Instant::now().duration_since(last_peer_log).as_secs() < 60 {
                return;
            }
        } else {
            // Suppress initial logs until the peer set has started up.
            // There can be multiple initial requests before the first peer is
            // ready.
            self.last_peer_log = Some(Instant::now());
            return;
        }
        self.last_peer_log = Some(Instant::now());
        let address_metrics = self.address_metrics.borrow();
        if unready_services_len == 0 {
            warn!(
                ?address_metrics,
                "network request with no peer connections. Hint: check your network connection"
            );
        } else {
            info!(?address_metrics, "network request with no ready peers: finding more peers, waiting for {} peers to answer requests",
                  unready_services_len);
        }
    }
fn log_peer_set_size ( & mut self ) { let ready_services_len = self . ready_services . len ( ) ; let unready_services_len = self . unready_services . len ( ) ; trace ! ( ready_peers ready_services_len unready_peers unready_services_len ) ; if ready_services_len > 0 { return ; } // These logs are designed to be human-readable in a terminal, at the // default Zebra log level. If you need to know the peer set size for // every request, use the trace-level logs, or the metrics exporter. if let Some ( last_peer_log ) = self . last_peer_log { // Avoid duplicate peer set logs if Instant :: now ( ) . duration_since ( last_peer_log ) . as_secs ( ) < 60 { return ; } } else { // Suppress initial logs until the peer set has started up. // There can be multiple initial requests before the first peer is // ready. self . last_peer_log = Some ( Instant :: now ( ) ) ; return ; } self . last_peer_log = Some ( Instant :: now ( ) ) ; let address_metrics = self . address_metrics . borrow ( ) ; if unready_services_len == 0 { warn ! ( address_metrics " " ) ; } else { info ! ( address_metrics " " unready_services_len ) ; } }
Logs the peer set size.
Logs the peer set size .
&mut self