Better logging on agent

This commit is contained in:
dynco-nym
2024-10-30 01:09:01 +01:00
parent ab0320733e
commit ef99d657d4
4 changed files with 9 additions and 2 deletions
Generated
+1 -1
View File
@@ -6575,7 +6575,7 @@ dependencies = [
[[package]]
name = "nym-node-status-agent"
version = "0.1.0"
version = "0.1.2"
dependencies = [
"anyhow",
"clap 4.5.20",
+1 -1
View File
@@ -4,7 +4,7 @@
[package]
name = "nym-node-status-agent"
version = "0.1.0"
version = "0.1.2"
authors.workspace = true
repository.workspace = true
homepage.workspace = true
+1
View File
@@ -97,6 +97,7 @@ async fn submit_results(
) -> anyhow::Result<()> {
let target_url = format!("{}/{}/{}", server_addr, URL_BASE, testrun_id);
let client = reqwest::Client::new();
let res = client
.post(target_url)
.body(probe_outcome)
+6
View File
@@ -40,6 +40,12 @@ impl GwProbe {
match command.spawn() {
Ok(child) => {
if let Ok(output) = child.wait_with_output() {
if !output.status.success() {
let out = String::from_utf8_lossy(&output.stdout);
let err = String::from_utf8_lossy(&output.stderr);
tracing::error!("Probe exited with {:?}:\n{}\n{}", output.status, out, err);
}
return String::from_utf8(output.stdout)
.unwrap_or("Unable to get log from test run".to_string());
}