diff --git a/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase2-wayland-check.rs b/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase2-wayland-check.rs index f48ead181b..a6a794feaa 100644 --- a/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase2-wayland-check.rs +++ b/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase2-wayland-check.rs @@ -207,7 +207,7 @@ impl Report { }; if let Err(err) = serde_json::to_writer(std::io::stdout(), &report) { - eprintln!("{PROGRAM}: failed to serialize JSON: {err}"); + log::error!("{PROGRAM}: failed to serialize JSON: {err}"); } } } @@ -569,11 +569,12 @@ fn run() -> Result<(), String> { } fn main() { + env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info")).init(); if let Err(err) = run() { if err.is_empty() { process::exit(0); } - eprintln!("{PROGRAM}: {err}"); + log::error!("{PROGRAM}: {err}"); process::exit(1); } } diff --git a/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase3-kwin-check.rs b/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase3-kwin-check.rs index 4d3d45e189..18652114fa 100644 --- a/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase3-kwin-check.rs +++ b/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase3-kwin-check.rs @@ -185,7 +185,7 @@ impl Report { }; if let Err(err) = serde_json::to_writer(std::io::stdout(), &report) { - eprintln!("{PROGRAM}: failed to serialize JSON: {err}"); + log::error!("{PROGRAM}: failed to serialize JSON: {err}"); } } } @@ -464,11 +464,12 @@ fn run() -> Result<(), String> { } fn main() { + env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info")).init(); if let Err(err) = run() { if err.is_empty() { process::exit(0); } - eprintln!("{PROGRAM}: {err}"); + log::error!("{PROGRAM}: {err}"); process::exit(1); } } diff --git a/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase4-kde-check.rs b/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase4-kde-check.rs index 17b6cc5e4d..267b93e78d 100644 --- a/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase4-kde-check.rs +++ b/local/recipes/system/redbear-hwutils/source/src/bin/redbear-phase4-kde-check.rs @@ -187,7 +187,7 @@ impl Report { }; if let Err(err) = serde_json::to_writer(std::io::stdout(), &report) { - eprintln!("{PROGRAM}: failed to serialize JSON: {err}"); + log::error!("{PROGRAM}: failed to serialize JSON: {err}"); } } } @@ -743,11 +743,12 @@ fn run() -> Result<(), String> { } fn main() { + env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info")).init(); if let Err(err) = run() { if err.is_empty() { process::exit(0); } - eprintln!("{PROGRAM}: {err}"); + log::error!("{PROGRAM}: {err}"); process::exit(1); } }