From cfb7bdcfd8d57e2a949fd900615bbaf75b4ea0dd Mon Sep 17 00:00:00 2001 From: Liu-Cheng Xu Date: Sun, 22 Dec 2024 16:35:07 +0800 Subject: [PATCH] Update prometheus binding failure logging format The output of `{:#?}` for the error details is a bit of annoying, this change makes a more consistent formatting style for error messages. --- substrate/utils/prometheus/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/utils/prometheus/src/lib.rs b/substrate/utils/prometheus/src/lib.rs index 5edac2e6650f..843d82dcfad5 100644 --- a/substrate/utils/prometheus/src/lib.rs +++ b/substrate/utils/prometheus/src/lib.rs @@ -87,7 +87,7 @@ async fn request_metrics( /// to serve metrics. pub async fn init_prometheus(prometheus_addr: SocketAddr, registry: Registry) -> Result<(), Error> { let listener = tokio::net::TcpListener::bind(&prometheus_addr).await.map_err(|e| { - log::error!(target: "prometheus", "Error binding to '{:#?}': {:#?}", prometheus_addr, e); + log::error!(target: "prometheus", "Error binding to '{:?}': {:?}", prometheus_addr, e); Error::PortInUse(prometheus_addr) })?;