Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Commit 70220a2

Browse files
authored
Adjust level of replication session and document materialization logs (#639)
* Remove relay and direct peer poll attempt logging * Change document creation/update/delete logging to info level * Lower level of replication session logs to debug * Update CHANGELOG * Remove incorrectly commit file * Lower logging level for replication finished message * Fix logging logic error in reducer * Improve GraphQL re-build error
1 parent 5e66b62 commit 70220a2

File tree

6 files changed

+11
-15
lines changed

6 files changed

+11
-15
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818

1919
- Update `libp2p` to version `0.53.2` and apply API changes [#631](https://github.com/p2panda/aquadoggo/pull/631)
2020
- Move relay registration into main network service event loop [#632](https://github.com/p2panda/aquadoggo/pull/632)
21+
- Adjust level of replication and materialization logs [#639](https://github.com/p2panda/aquadoggo/pull/639)
2122

2223
### Fixed
2324

aquadoggo/src/graphql/schema.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ impl GraphQLSchemaManager {
214214
async fn rebuild(shared: GraphQLSharedData, schemas: GraphQLSchemas) {
215215
match build_root_schema(shared.store, shared.tx, shared.schema_provider).await {
216216
Ok(schema) => schemas.lock().await.push(schema),
217-
Err(err) => warn!("Error building GraphQL schema: {}", err),
217+
Err(err) => warn!("Can't re-build GraphQL schema: {}", err),
218218
}
219219
}
220220

aquadoggo/src/materializer/tasks/reduce.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: AGPL-3.0-or-later
22

3-
use log::{debug, trace};
3+
use log::{debug, info, trace};
44
use p2panda_rs::document::traits::AsDocument;
55
use p2panda_rs::document::{DocumentBuilder, DocumentId, DocumentViewId};
66
use p2panda_rs::operation::traits::{AsOperation, WithPublicKey};
@@ -226,23 +226,20 @@ async fn reduce_document<O: AsOperation + WithId<OperationId> + WithPublicKey>(
226226

227227
let mut tasks = vec![];
228228

229-
// If the document was deleted, then we return nothing
230229
if document.is_deleted() {
231-
debug!(
230+
info!(
232231
"Deleted {} final view {}",
233232
document.display(),
234233
document.view_id().display()
235234
);
236-
}
237-
238-
if document.is_edited() {
239-
debug!(
235+
} else if document.is_edited() {
236+
info!(
240237
"Updated {} latest view {}",
241238
document.display(),
242239
document.view_id().display()
243240
);
244241
} else {
245-
debug!("Created {}", document.display());
242+
info!("Created {}", document.display());
246243
};
247244

248245
if document.is_deleted() || document.is_edited() {

aquadoggo/src/network/service.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ impl EventLoop {
258258
async fn attempt_dial_known_addresses(&mut self) {
259259
// Attempt to dial all relay addresses.
260260
for relay_address in self.network_config.relay_addresses.iter_mut() {
261-
debug!("Dial relay at address {}", relay_address);
262261
dial_known_peer(
263262
&mut self.swarm,
264263
&mut self.known_peers,
@@ -269,7 +268,6 @@ impl EventLoop {
269268

270269
// Attempt to dial all direct peer addresses.
271270
for direct_node_address in self.network_config.direct_node_addresses.iter_mut() {
272-
debug!("Dial direct peer at address {}", direct_node_address);
273271
dial_known_peer(
274272
&mut self.swarm,
275273
&mut self.known_peers,

aquadoggo/src/replication/manager.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::collections::HashMap;
44
use std::hash::Hash;
55

66
use anyhow::Result;
7-
use log::{debug, info, trace, warn};
7+
use log::{debug, trace, warn};
88
use p2panda_rs::entry::EncodedEntry;
99
use p2panda_rs::operation::EncodedOperation;
1010
use p2panda_rs::Human;
@@ -179,7 +179,7 @@ where
179179

180180
let sessions = self.get_sessions(remote_peer);
181181

182-
info!(
182+
debug!(
183183
"Initiate outbound replication session with peer {}",
184184
remote_peer.display()
185185
);
@@ -393,7 +393,7 @@ where
393393
.await;
394394
};
395395

396-
info!(
396+
debug!(
397397
"Accept inbound replication session with peer {}",
398398
remote_peer.display()
399399
);

aquadoggo/src/replication/service.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ impl ConnectionManager {
285285

286286
/// Handle successful replication sessions.
287287
async fn on_replication_finished(&mut self, peer: Peer, _session_id: SessionId) {
288-
info!("Finished replication with peer {}", peer.display());
288+
debug!("Finished replication with peer {}", peer.display());
289289

290290
match self.peers.get_mut(&peer) {
291291
Some(status) => {

0 commit comments

Comments
 (0)