Skip to content

Commit

Permalink
Use tracing log macros directly
Browse files Browse the repository at this point in the history
  • Loading branch information
teor2345 committed Jan 2, 2025
1 parent 44480e0 commit 0c0577d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions shared/subspace-data-retrieval/src/object_fetcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ where

// Validate parameters
if !piece_index.is_source() {
tracing::debug!(
debug!(
?mapping,
"Invalid piece index for object: must be a source piece",
);
Expand All @@ -216,7 +216,7 @@ where
}

if offset >= RawRecord::SIZE as u32 {
tracing::debug!(
debug!(
?mapping,
RawRecord_SIZE = RawRecord::SIZE,
"Invalid piece offset for object: must be less than the size of a raw record",
Expand Down Expand Up @@ -245,13 +245,13 @@ where

let data_hash = blake3_hash(&data);
if data_hash != hash {
tracing::debug!(
debug!(
?data_hash,
data_size = %data.len(),
?mapping,
"Retrieved data doesn't match requested mapping hash"
);
tracing::trace!(data = %hex::encode(&data), "Retrieved data");
trace!(data = %hex::encode(&data), "Retrieved data");

return Err(Error::InvalidDataHash {
data_hash,
Expand Down Expand Up @@ -423,7 +423,7 @@ where
let offset_in_segment =
piece_position_in_segment as usize * RawRecord::SIZE + offset as usize;

tracing::trace!(
trace!(
%segment_index,
offset_in_segment,
piece_position_in_segment,
Expand Down Expand Up @@ -466,7 +466,7 @@ where
}
})?;

tracing::trace!(
trace!(
progress,
%segment_index,
offset_in_segment,
Expand Down Expand Up @@ -510,7 +510,7 @@ where
}
};

tracing::trace!(
trace!(
%segment_index,
offset_in_segment,
piece_position_in_segment,
Expand Down

0 comments on commit 0c0577d

Please sign in to comment.