From e8a4fa505377103f83f0675625054111e6be180b Mon Sep 17 00:00:00 2001 From: Alex Zenla Date: Mon, 27 Oct 2025 00:20:42 -0400 Subject: [PATCH] Revert "fix(log): make all logging debug! instead of info!" This reverts commit 717e7716ba5c4a83546e8fc2438e7cc4dbe99b8d. --- src/actions/chainload.rs | 6 +++--- src/config/loader.rs | 4 ++-- src/drivers.rs | 8 ++++---- src/main.rs | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/actions/chainload.rs b/src/actions/chainload.rs index 08eb5a6..891ca27 100644 --- a/src/actions/chainload.rs +++ b/src/actions/chainload.rs @@ -3,7 +3,7 @@ use crate::utils; use crate::utils::media_loader::MediaLoaderHandle; use crate::utils::media_loader::constants::linux::LINUX_EFI_INITRD_MEDIA_GUID; use anyhow::{Context, Result, bail}; -use log::{debug, error}; +use log::{error, info}; use serde::{Deserialize, Serialize}; use std::rc::Rc; use uefi::CString16; @@ -72,7 +72,7 @@ pub fn chainload(context: Rc, configuration: &ChainloadConfigurat .context("unable to convert chainloader options to CString16")?, ); - debug!("options: {}", options); + info!("options: {}", options); if options.num_bytes() > u32::MAX as usize { bail!("chainloader options too large"); @@ -101,7 +101,7 @@ pub fn chainload(context: Rc, configuration: &ChainloadConfigurat // Retrieve the base and size of the loaded image to display. let (base, size) = loaded_image_protocol.info(); - debug!("loaded image: base={:#x} size={:#x}", base.addr(), size); + info!("loaded image: base={:#x} size={:#x}", base.addr(), size); // Start the loaded image. // This call might return, or it may pass full control to another image that will never return. diff --git a/src/config/loader.rs b/src/config/loader.rs index 3703a85..d02ed18 100644 --- a/src/config/loader.rs +++ b/src/config/loader.rs @@ -2,7 +2,7 @@ use crate::config::{RootConfiguration, latest_version}; use crate::options::SproutOptions; use crate::utils; use anyhow::{Context, Result, bail}; -use log::debug; +use log::info; use std::ops::Deref; use toml::Value; use uefi::proto::device_path::LoadedImageDevicePath; @@ -16,7 +16,7 @@ fn load_raw_config(options: &SproutOptions) -> Result> { // Acquire the device path as a boxed device path. let path = current_image_device_path_protocol.deref().to_boxed(); - debug!("configuration file: {}", options.config); + info!("configuration file: {}", options.config); // Read the contents of the sprout config file. let content = utils::read_file_contents(&path, &options.config) diff --git a/src/drivers.rs b/src/drivers.rs index ef06f78..f2e0daa 100644 --- a/src/drivers.rs +++ b/src/drivers.rs @@ -1,7 +1,7 @@ use crate::context::SproutContext; use crate::utils; use anyhow::{Context, Result}; -use log::debug; +use log::info; use serde::{Deserialize, Serialize}; use std::collections::BTreeMap; use std::rc::Rc; @@ -33,7 +33,7 @@ fn load_driver(context: Rc, driver: &DriverDeclaration) -> Result // Push the path of the driver from the root. full_path.push_str(&context.stamp(&driver.path)); - debug!("driver path: {}", full_path); + info!("driver path: {}", full_path); // Convert the path to a device path. let device_path = utils::text_to_device_path(&full_path)?; @@ -86,7 +86,7 @@ pub fn load( return Ok(()); } - debug!("loading drivers"); + info!("loading drivers"); // Load all the drivers in no particular order. for (name, driver) in drivers { @@ -95,7 +95,7 @@ pub fn load( // Reconnect all the controllers to all handles. reconnect().context("unable to reconnect drivers")?; - debug!("loaded drivers"); + info!("loaded drivers"); // We've now loaded all the drivers, so we can return. Ok(()) diff --git a/src/main.rs b/src/main.rs index dc2b3e6..af59c42 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,7 +7,7 @@ use crate::options::SproutOptions; use crate::options::parser::OptionsRepresentable; use crate::phases::phase; use anyhow::{Context, Result}; -use log::debug; +use log::info; use std::collections::BTreeMap; use std::ops::Deref; use std::time::Duration; @@ -73,7 +73,7 @@ fn main() -> Result<()> { >(uefi::boot::image_handle()) .context("unable to get loaded image device path")?; let loaded_image_path = current_image_device_path_protocol.deref().to_boxed(); - debug!( + info!( "loaded image path: {}", loaded_image_path.to_string(DisplayOnly(false), AllowShortcuts(false))? ); @@ -103,7 +103,7 @@ fn main() -> Result<()> { for (name, extractor) in &config.extractors { let value = extractors::extract(context.clone(), extractor) .context(format!("unable to extract value {}", name))?; - debug!("extracted value {}: {}", name, value); + info!("extracted value {}: {}", name, value); extracted.insert(name.clone(), value); } let mut context = context.fork();