Skip to content

Commit

Permalink
use tracing::debug instead of println
Browse files Browse the repository at this point in the history
  • Loading branch information
henil committed Dec 5, 2022
1 parent ed3f786 commit bba9ce4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rumqttd/src/server/broker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ use crate::{Config, ConnectionId, ServerSettings};
use tokio::net::{TcpListener, TcpStream};
use tokio::time::error::Elapsed;
use tokio::{task, time};
use tracing::debug;

#[derive(Debug, thiserror::Error)]
#[error("Acceptor error")]
Expand Down Expand Up @@ -233,16 +234,16 @@ impl Broker {
}
};

println!("Metrics = {:?}", metrics);
std::thread::sleep(Duration::from_secs(timeout));
match metrics {
Meter::Router(_, r) => {
Meter::Router(_, ref r) => {
total_connections.set(r.total_connections as f64);
total_publishes.set(r.total_publishes as f64);
failed_publishes.set(r.failed_publishes as f64);
}
_ => panic!("We only request for router metrics"),
}
debug!("Prometheus update: {:?}", &metrics);
}
})?;
}
Expand Down

0 comments on commit bba9ce4

Please sign in to comment.