Skip to content

Commit

Permalink
Reduce metrics log output
Browse files Browse the repository at this point in the history
(cherry picked from commit f142451)
  • Loading branch information
mvines committed Apr 18, 2020
1 parent b9cf02f commit 7013003
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions metrics/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,15 @@ impl MetricsWriter for InfluxDbMetricsWriter {
.unwrap();
let response = client.post(write_url.as_str()).body(line).send();
if let Ok(resp) = response {
info!(
"submit response: {} {}",
resp.status(),
resp.text().unwrap()
);
if !resp.status().is_success() {
warn!(
"submit response unsuccessful: {} {}",
resp.status(),
resp.text().unwrap()
);
}
} else {
error!("submit error: {}", response.unwrap_err());
warn!("submit error: {}", response.unwrap_err());
}
}
}
Expand Down

0 comments on commit 7013003

Please sign in to comment.