Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
protocol: downgrade `warn!` logs
Fintan Halpenny committed 3 months ago
commit 95b3d10961dd5db11396d548df11e91507632ffc
parent 9236277abf85f51322d59f4a9e13a228edcf7157
3 files changed +7 -7
modified crates/radicle-protocol/src/service.rs
@@ -691,7 +691,7 @@ where

            // If we're not seeding this repo, just skip it.
            if !self.policies.is_seeding(&rid)? {
-
                warn!(target: "service", "Local repository {rid} is not seeded");
+
                debug!(target: "service", "Local repository {rid} is not seeded");
                continue;
            }
            // Add public repositories to inventory.
@@ -1813,7 +1813,7 @@ where
        let local = self.node_id();
        let relay = self.config.is_relay();
        let Some(peer) = self.sessions.get_mut(remote) else {
-
            warn!(target: "service", "Session not found for {remote}");
+
            debug!(target: "service", "Session not found for {remote}");
            return Ok(());
        };
        peer.last_active = self.clock;
@@ -2537,7 +2537,7 @@ where
                    }
                }
                Err(err) => {
-
                    log::warn!(target: "protocol::filter", "Failed to check if {rid} exists: {err}");
+
                    log::debug!(target: "protocol::filter", "Failed to check if {rid} exists: {err}");
                    continue;
                }
            }
modified crates/radicle-protocol/src/service/message.rs
@@ -217,9 +217,9 @@ impl RefsStatus {
                self.want.push(theirs);
            }
            Err(e) => {
-
                log::warn!(
+
                log::debug!(
                    target: "service",
-
                    "Error getting cached ref of {repo} for refs status: {e}"
+
                    "Failed to get cached 'rad/sigrefs' of {} in {repo} for refs status: {e}", theirs.remote,
                );
            }
        }
modified crates/radicle-protocol/src/service/session.rs
@@ -301,7 +301,7 @@ impl Session {
    pub fn fetched(&mut self, rid: RepoId) {
        if let State::Connected { fetching, .. } = &mut self.state {
            if !fetching.remove(&rid) {
-
                log::warn!(target: "service", "Fetched unknown repository {rid}");
+
                log::debug!(target: "service", "Fetched unknown repository {rid}");
            }
        }
    }
@@ -319,7 +319,7 @@ impl Session {
        self.last_active = since;

        if let State::Connected { .. } = &self.state {
-
            log::error!(target: "service", "Session {} is already in 'connected' state, resetting..", self.id);
+
            log::debug!(target: "service", "Session {} is already in 'connected' state, resetting..", self.id);
        };
        self.state = State::Connected {
            since,