Make debug logging into an optional feature

This commit is contained in:
Michael Mikovsky
2025-11-11 11:00:28 -07:00
parent 379b6a7e25
commit 258599c9c7
12 changed files with 151 additions and 38 deletions
+4 -4
View File
@@ -7,17 +7,17 @@ use unshell_lib::{
extern crate unshell_lib;
fn main() {
// #[cfg(not(feature = "obfuscate"))]
#[cfg(not(feature = "obfuscate"))]
unshell_lib::logger::PrettyLogger::init();
info!("Initialized");
debug!("Initialized");
match || -> Result<(), ModuleError> {
let args = std::env::args();
let mut modules = Vec::new();
for arg in args.skip(1) {
info!("Loading module: {}", arg);
debug!("Loading module: {}", arg);
modules.push(Module::new(&arg)?)
}
Manager::run(modules);
@@ -26,7 +26,7 @@ fn main() {
}() {
Ok(_) => {}
Err(e) => {
info!("ERROR! {:?}", e);
debug!("ERROR! {:?}", e);
}
}
}