fix(log): make all logging debug! instead of info!

This commit is contained in:
2025-10-27 00:15:40 -04:00
parent 1d32855d22
commit 717e7716ba
4 changed files with 12 additions and 12 deletions

View File

@@ -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::{error, info};
use log::{debug, error};
use serde::{Deserialize, Serialize};
use std::rc::Rc;
use uefi::CString16;
@@ -72,7 +72,7 @@ pub fn chainload(context: Rc<SproutContext>, configuration: &ChainloadConfigurat
.context("unable to convert chainloader options to CString16")?,
);
info!("options: {}", options);
debug!("options: {}", options);
if options.num_bytes() > u32::MAX as usize {
bail!("chainloader options too large");
@@ -101,7 +101,7 @@ pub fn chainload(context: Rc<SproutContext>, configuration: &ChainloadConfigurat
// Retrieve the base and size of the loaded image to display.
let (base, size) = loaded_image_protocol.info();
info!("loaded image: base={:#x} size={:#x}", base.addr(), size);
debug!("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.

View File

@@ -2,7 +2,7 @@ use crate::config::{RootConfiguration, latest_version};
use crate::options::SproutOptions;
use crate::utils;
use anyhow::{Context, Result, bail};
use log::info;
use log::debug;
use std::ops::Deref;
use toml::Value;
use uefi::proto::device_path::LoadedImageDevicePath;
@@ -16,7 +16,7 @@ fn load_raw_config(options: &SproutOptions) -> Result<Vec<u8>> {
// Acquire the device path as a boxed device path.
let path = current_image_device_path_protocol.deref().to_boxed();
info!("configuration file: {}", options.config);
debug!("configuration file: {}", options.config);
// Read the contents of the sprout config file.
let content = utils::read_file_contents(&path, &options.config)

View File

@@ -1,7 +1,7 @@
use crate::context::SproutContext;
use crate::utils;
use anyhow::{Context, Result};
use log::info;
use log::debug;
use serde::{Deserialize, Serialize};
use std::collections::BTreeMap;
use std::rc::Rc;
@@ -33,7 +33,7 @@ fn load_driver(context: Rc<SproutContext>, driver: &DriverDeclaration) -> Result
// Push the path of the driver from the root.
full_path.push_str(&context.stamp(&driver.path));
info!("driver path: {}", full_path);
debug!("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(());
}
info!("loading drivers");
debug!("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")?;
info!("loaded drivers");
debug!("loaded drivers");
// We've now loaded all the drivers, so we can return.
Ok(())

View File

@@ -7,7 +7,7 @@ use crate::options::SproutOptions;
use crate::options::parser::OptionsRepresentable;
use crate::phases::phase;
use anyhow::{Context, Result};
use log::info;
use log::debug;
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();
info!(
debug!(
"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))?;
info!("extracted value {}: {}", name, value);
debug!("extracted value {}: {}", name, value);
extracted.insert(name.clone(), value);
}
let mut context = context.fork();