Skip to content

Commit

Permalink
feat: added envvars to debug info
Browse files Browse the repository at this point in the history
resolves #161
  • Loading branch information
lilopkins committed May 1, 2024
1 parent a43674c commit d6dd1fb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion testangel/src/ui/about.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,14 @@ impl SimpleComponent for AppAbout {

let engine_list = init.0;
let action_map = init.1;
let mut env_var_data = String::new();
for (var, val) in std::env::vars() {
if var.starts_with("TA_") {
env_var_data.push_str(&format!("{var}={val}\n"));
}
}
let log_data = format!(
"Debug data generated at: {}\nSoftware version: {}\nLocale: {} (system wanted: {:?})\n\nEngines:\n{:#?}\n\nActions:\n{:#?}",
"Debug data generated at: {}\nSoftware version: {}\nLocale: {} (system wanted: {:?})\n\nEnvironment:\n{env_var_data}\nEngines:\n{:#?}\n\nActions:\n{:#?}",
chrono::Local::now(),
env!("CARGO_PKG_VERSION"),
lang::current_locale(),
Expand Down

0 comments on commit d6dd1fb

Please sign in to comment.