From 519a7c31b37c9aa29ae2f0e5af66056ffcd3d443 Mon Sep 17 00:00:00 2001 From: Astrid Yu Date: Sat, 26 Aug 2023 22:35:13 -0700 Subject: [PATCH] tracing::instrument everywhere --- src/burn/state_tracking.rs | 2 +- src/ui/ask_hash.rs | 5 +++++ src/ui/ask_outfile.rs | 4 ++++ src/ui/burn/fancy/display.rs | 2 ++ src/ui/burn/fancy/state.rs | 3 +++ src/ui/burn/start.rs | 2 ++ src/ui/main.rs | 1 + 7 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/burn/state_tracking.rs b/src/burn/state_tracking.rs index 4f577ad..7483403 100644 --- a/src/burn/state_tracking.rs +++ b/src/burn/state_tracking.rs @@ -28,6 +28,7 @@ impl ChildState { ChildState::Burning(Burning::new(now, is_input_compressed, input_file_bytes)) } + #[tracing::instrument(skip_all, fields(now, msg))] pub fn on_status(mut self, now: Instant, msg: Option) -> Self { match msg { Some(StatusMessage::TotalBytes { src, dest }) => { @@ -35,7 +36,6 @@ impl ChildState { self } Some(StatusMessage::FinishedWriting { verifying }) => { - debug!(verifying, "Got FinishedWriting"); match self { ChildState::Burning(st) => st.into_finished(now, verifying), c => c, diff --git a/src/ui/ask_hash.rs b/src/ui/ask_hash.rs index 79e97f9..d880b1d 100644 --- a/src/ui/ask_hash.rs +++ b/src/ui/ask_hash.rs @@ -16,6 +16,7 @@ use crate::{ use super::cli::{BurnArgs, HashArg, HashOf}; +#[tracing::instrument(skip_all, fields(cf))] pub fn ask_hash(args: &BurnArgs, cf: CompressionFormat) -> anyhow::Result> { let hash_params = match &args.hash { HashArg::Skip => None, @@ -54,6 +55,7 @@ pub fn ask_hash(args: &BurnArgs, cf: CompressionFormat) -> anyhow::Result