Reduce metrics log output

(cherry picked from commit f142451a33)
This commit is contained in:
Michael Vines
2020-04-17 21:49:13 -07:00
parent b9cf02fd6a
commit 701300334a

View File

@ -103,13 +103,15 @@ impl MetricsWriter for InfluxDbMetricsWriter {
.unwrap(); .unwrap();
let response = client.post(write_url.as_str()).body(line).send(); let response = client.post(write_url.as_str()).body(line).send();
if let Ok(resp) = response { if let Ok(resp) = response {
info!( if !resp.status().is_success() {
"submit response: {} {}", warn!(
resp.status(), "submit response unsuccessful: {} {}",
resp.text().unwrap() resp.status(),
); resp.text().unwrap()
);
}
} else { } else {
error!("submit error: {}", response.unwrap_err()); warn!("submit error: {}", response.unwrap_err());
} }
} }
} }