hypha: add trace logging to cfgblk

This commit is contained in:
Alex Zenla 2024-01-22 21:28:14 -08:00
parent e89aead9ad
commit 685a15b056
No known key found for this signature in database
GPG Key ID: 067B238899B51269
2 changed files with 5 additions and 1 deletions

View File

@ -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(())
}
}

View File

@ -1,6 +1,6 @@
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize)]
#[derive(Serialize, Deserialize, Debug)]
pub struct LaunchInfo {
pub run: Option<Vec<String>>,
}