From f142451a33fd22ec436709917a791b9bde3ac979 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Fri, 17 Apr 2020 21:49:13 -0700 Subject: [PATCH] Reduce metrics log output --- metrics/src/metrics.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/metrics/src/metrics.rs b/metrics/src/metrics.rs index dafa5e90cb..56b7e9d517 100644 --- a/metrics/src/metrics.rs +++ b/metrics/src/metrics.rs @@ -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()); } } }