diff --git a/CHANGELOG.md b/CHANGELOG.md index 108486fce..959287223 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Update `libp2p` to version `0.53.2` and apply API changes [#631](https://github.com/p2panda/aquadoggo/pull/631) - Move relay registration into main network service event loop [#632](https://github.com/p2panda/aquadoggo/pull/632) +- Adjust level of replication and materialization logs [#639](https://github.com/p2panda/aquadoggo/pull/639) ### Fixed diff --git a/aquadoggo/src/graphql/schema.rs b/aquadoggo/src/graphql/schema.rs index 5f385c7f0..68a0defe4 100644 --- a/aquadoggo/src/graphql/schema.rs +++ b/aquadoggo/src/graphql/schema.rs @@ -214,7 +214,7 @@ impl GraphQLSchemaManager { async fn rebuild(shared: GraphQLSharedData, schemas: GraphQLSchemas) { match build_root_schema(shared.store, shared.tx, shared.schema_provider).await { Ok(schema) => schemas.lock().await.push(schema), - Err(err) => warn!("Error building GraphQL schema: {}", err), + Err(err) => warn!("Can't re-build GraphQL schema: {}", err), } } diff --git a/aquadoggo/src/materializer/tasks/reduce.rs b/aquadoggo/src/materializer/tasks/reduce.rs index ed37e5a47..5d9a04b4a 100644 --- a/aquadoggo/src/materializer/tasks/reduce.rs +++ b/aquadoggo/src/materializer/tasks/reduce.rs @@ -1,6 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-or-later -use log::{debug, trace}; +use log::{debug, info, trace}; use p2panda_rs::document::traits::AsDocument; use p2panda_rs::document::{DocumentBuilder, DocumentId, DocumentViewId}; use p2panda_rs::operation::traits::{AsOperation, WithPublicKey}; @@ -226,23 +226,20 @@ async fn reduce_document + WithPublicKey>( let mut tasks = vec![]; - // If the document was deleted, then we return nothing if document.is_deleted() { - debug!( + info!( "Deleted {} final view {}", document.display(), document.view_id().display() ); - } - - if document.is_edited() { - debug!( + } else if document.is_edited() { + info!( "Updated {} latest view {}", document.display(), document.view_id().display() ); } else { - debug!("Created {}", document.display()); + info!("Created {}", document.display()); }; if document.is_deleted() || document.is_edited() { diff --git a/aquadoggo/src/network/service.rs b/aquadoggo/src/network/service.rs index 41840d899..5f691540e 100644 --- a/aquadoggo/src/network/service.rs +++ b/aquadoggo/src/network/service.rs @@ -258,7 +258,6 @@ impl EventLoop { async fn attempt_dial_known_addresses(&mut self) { // Attempt to dial all relay addresses. for relay_address in self.network_config.relay_addresses.iter_mut() { - debug!("Dial relay at address {}", relay_address); dial_known_peer( &mut self.swarm, &mut self.known_peers, @@ -269,7 +268,6 @@ impl EventLoop { // Attempt to dial all direct peer addresses. for direct_node_address in self.network_config.direct_node_addresses.iter_mut() { - debug!("Dial direct peer at address {}", direct_node_address); dial_known_peer( &mut self.swarm, &mut self.known_peers, diff --git a/aquadoggo/src/replication/manager.rs b/aquadoggo/src/replication/manager.rs index d6756ff81..d94b93c2e 100644 --- a/aquadoggo/src/replication/manager.rs +++ b/aquadoggo/src/replication/manager.rs @@ -4,7 +4,7 @@ use std::collections::HashMap; use std::hash::Hash; use anyhow::Result; -use log::{debug, info, trace, warn}; +use log::{debug, trace, warn}; use p2panda_rs::entry::EncodedEntry; use p2panda_rs::operation::EncodedOperation; use p2panda_rs::Human; @@ -179,7 +179,7 @@ where let sessions = self.get_sessions(remote_peer); - info!( + debug!( "Initiate outbound replication session with peer {}", remote_peer.display() ); @@ -393,7 +393,7 @@ where .await; }; - info!( + debug!( "Accept inbound replication session with peer {}", remote_peer.display() ); diff --git a/aquadoggo/src/replication/service.rs b/aquadoggo/src/replication/service.rs index 8de90aa1e..a05b941c9 100644 --- a/aquadoggo/src/replication/service.rs +++ b/aquadoggo/src/replication/service.rs @@ -285,7 +285,7 @@ impl ConnectionManager { /// Handle successful replication sessions. async fn on_replication_finished(&mut self, peer: Peer, _session_id: SessionId) { - info!("Finished replication with peer {}", peer.display()); + debug!("Finished replication with peer {}", peer.display()); match self.peers.get_mut(&peer) { Some(status) => {