use crate::camera_probe::{self, CameraProbePaths};
fn init_logging() {
let filter = std::env::var("RUST_LOG").unwrap_or_else(|_| "info".to_string());
let _ = tracing_subscriber::fmt()
.with_env_filter(tracing_subscriber::EnvFilter::new(&filter))
.try_init();
}
pub fn run() -> std::process::ExitCode {
init_logging();
let paths = CameraProbePaths::default();
match camera_probe::run(&paths) {
Ok(outcome) => tracing::info!(?outcome, "camera probe complete"),
Err(e) => tracing::warn!(error = %e, "camera probe error"),
}
std::process::ExitCode::SUCCESS
}