From d6dd1fb156bfc87bd6218f071e3a49e4f03e31ed Mon Sep 17 00:00:00 2001 From: Lily Hopkins Date: Wed, 1 May 2024 16:14:38 +0100 Subject: [PATCH] feat: added envvars to debug info resolves #161 --- testangel/src/ui/about.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/testangel/src/ui/about.rs b/testangel/src/ui/about.rs index b27fb7d..ef37257 100644 --- a/testangel/src/ui/about.rs +++ b/testangel/src/ui/about.rs @@ -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(),