From f69a03e19dc0faeaefa5a6b20d8491126e453435 Mon Sep 17 00:00:00 2001 From: Juraj Bubniak Date: Fri, 16 Jun 2023 07:31:00 +0200 Subject: [PATCH] Log not implemented messages as debug in prometheus metrics. --- src/prometheus.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/prometheus.rs b/src/prometheus.rs index b4884604..7774b5a5 100644 --- a/src/prometheus.rs +++ b/src/prometheus.rs @@ -1,6 +1,6 @@ use hyper::service::{make_service_fn, service_fn}; use hyper::{Body, Method, Request, Response, Server, StatusCode}; -use log::{error, info, warn}; +use log::{error, info, debug}; use phf::phf_map; use std::collections::HashMap; use std::fmt; @@ -275,7 +275,7 @@ fn push_address_stats(lines: &mut Vec) { { lines.push(prometheus_metric.to_string()); } else { - warn!("Metric {} not implemented for {}", key, address.name()); + debug!("Metric {} not implemented for {}", key, address.name()); } } } @@ -293,7 +293,7 @@ fn push_pool_stats(lines: &mut Vec) { { lines.push(prometheus_metric.to_string()); } else { - warn!("Metric {} not implemented for ({})", name, *pool_id); + debug!("Metric {} not implemented for ({})", name, *pool_id); } } } @@ -318,7 +318,7 @@ fn push_database_stats(lines: &mut Vec) { { lines.push(prometheus_metric.to_string()); } else { - warn!("Metric {} not implemented for {}", key, address.name()); + debug!("Metric {} not implemented for {}", key, address.name()); } } }