Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add more debug logs to client #2481

Merged
merged 3 commits into from
Dec 6, 2024

Conversation

ermineJose
Copy link
Contributor

Description

Add more debug logs to support traceability across the autonomi API.

Type of Change

Please mark the types of changes made in this pull request.

  • Bug fix (non-breaking change which fixes an issue)
  • [ x] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

Checklist

Please ensure all of the following tasks have been completed:

  • I have read the contributing guidelines.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have updated the documentation accordingly.
  • I have followed the conventional commits guidelines for commit messages.
  • I have verified my commit messages with commitlint.

@ermineJose ermineJose changed the title feat: add more debug logs to autonomi feat: add more debug logs to client Dec 3, 2024
@ermineJose ermineJose force-pushed the autonomi-logs branch 2 times, most recently from 6ea02cd to 9f69dbe Compare December 3, 2024 18:42
Comment on lines 169 to 172
debug!(
"Uploaded archive {:?} to the network and the address is {:?}",
archive, result
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
debug!(
"Uploaded archive {:?} to the network and the address is {:?}",
archive, result
);
debug!("Uploaded archive {archive:?} to the network and the address is {result:?}");

Tiny nitpick, but you can use the variable directly inside the {} thingy.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could do the same everywhere!

@@ -232,8 +233,13 @@ impl Client {

if let RecordKind::Chunk = header.kind {
let chunk: Chunk = try_deserialize_record(&record)?;
debug!("Chunk deserialized successfully: {:?}", chunk);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can skip the happy path, and only log the error.

@ermineJose ermineJose force-pushed the autonomi-logs branch 2 times, most recently from 409127c to 4bc2f7f Compare December 5, 2024 11:07
@ermineJose ermineJose added this pull request to the merge queue Dec 6, 2024
Merged via the queue into maidsafe:main with commit a9110b1 Dec 6, 2024
27 checks passed
@ermineJose ermineJose deleted the autonomi-logs branch December 6, 2024 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants