From 685a15b0569307fdb4d43a66c43508a57f6f0332 Mon Sep 17 00:00:00 2001 From: Alex Zenla Date: Mon, 22 Jan 2024 21:28:14 -0800 Subject: [PATCH] hypha: add trace logging to cfgblk --- hypha/src/ctl/cfgblk.rs | 4 ++++ hypha/src/shared/mod.rs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hypha/src/ctl/cfgblk.rs b/hypha/src/ctl/cfgblk.rs index b08f713..dd6fd2a 100644 --- a/hypha/src/ctl/cfgblk.rs +++ b/hypha/src/ctl/cfgblk.rs @@ -2,6 +2,7 @@ use crate::error::Result; use crate::image::ImageInfo; use crate::shared::LaunchInfo; use backhand::{FilesystemWriter, NodeHeader}; +use log::trace; use std::fs; use std::fs::File; use std::path::PathBuf; @@ -34,6 +35,7 @@ impl ConfigBlock<'_> { } pub fn build(&self, launch_config: &LaunchInfo) -> Result<()> { + trace!("ConfigBlock build launch_config={:?}", launch_config); let config_bundle_content = match self.config_bundle { None => None, Some(path) => Some(fs::read(path)?), @@ -83,7 +85,9 @@ impl ConfigBlock<'_> { )?; } let mut file = File::create(&self.file)?; + trace!("ConfigBlock build write sqaushfs"); writer.write(&mut file)?; + trace!("ConfigBlock build complete"); Ok(()) } } diff --git a/hypha/src/shared/mod.rs b/hypha/src/shared/mod.rs index ef779bf..417c3f0 100644 --- a/hypha/src/shared/mod.rs +++ b/hypha/src/shared/mod.rs @@ -1,6 +1,6 @@ use serde::{Deserialize, Serialize}; -#[derive(Serialize, Deserialize)] +#[derive(Serialize, Deserialize, Debug)] pub struct LaunchInfo { pub run: Option>, }