Skip to content

Commit

Permalink
Enable metadata debugging in embedded policy handling
Browse files Browse the repository at this point in the history
Added print statements to log metadata buffer size, contents, and processed metadata during embedded policy handling. These changes improve visibility and aid in debugging metadata-related issues.
  • Loading branch information
arkavo-com committed Jan 3, 2025
1 parent 2accdb1 commit e140cc1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,10 @@ async fn handle_rewrap(
locator = policy.get_locator().clone();
}
PolicyType::Embedded => {
// println!("embedded policy");
println!("embedded policy");
if let Some(body) = &policy.body {
println!("Metadata buffer size: {}", body.len());
println!("Metadata buffer contents: {:?}", body);
metadata = match root_as_metadata(body) {
Ok(metadata) => Some(metadata),
Err(e) => {
Expand All @@ -533,7 +535,7 @@ async fn handle_rewrap(
}
};
// TODO add contracts
// println!("metadata: {:#?}", metadata);
println!("metadata: {:#?}", metadata);
}
// add content rating contract
let rl = ResourceLocator {
Expand Down

0 comments on commit e140cc1

Please sign in to comment.