From 75d820b5cb7664f5b5b28801309ffae1afb833be Mon Sep 17 00:00:00 2001 From: BioTheWolff <47079795+BioTheWolff@users.noreply.github.com> Date: Fri, 26 Apr 2024 12:48:29 +0200 Subject: [PATCH] feat: add info logging for layers merging --- src/fs-gen/src/image_builder.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/fs-gen/src/image_builder.rs b/src/fs-gen/src/image_builder.rs index 026b990..b34221a 100644 --- a/src/fs-gen/src/image_builder.rs +++ b/src/fs-gen/src/image_builder.rs @@ -13,7 +13,7 @@ use fuse_backend_rs::{ passthrough::{self, PassthroughFs}, transport::{FuseChannel, FuseSession}, }; -use tracing::{debug, warn}; +use tracing::{debug, info, warn}; static FILE_EXISTS_ERROR: i32 = 17; @@ -72,6 +72,8 @@ fn ensure_folder_created(output_folder: &Path) -> Result<()> { /// merge_layer(vec!["source/layer_1", "source/layer_2"], "/tmp/fused_layers", "/tmp") /// ``` pub fn merge_layer(blob_paths: &[PathBuf], output_folder: &Path, tmp_folder: &Path) -> Result<()> { + info!("Starting to merge layers..."); + // Stack all lower layers let mut lower_layers = Vec::new(); for lower in blob_paths { @@ -134,6 +136,8 @@ pub fn merge_layer(blob_paths: &[PathBuf], output_folder: &Path, tmp_folder: &Pa .with_context(|| "Failed to unmount the fuse session".to_string())?; let _ = handle.join(); + + info!("Finished merging layers!"); Ok(()) }