diff --git a/prdoc/pr_6979.prdoc b/prdoc/pr_6979.prdoc new file mode 100644 index 000000000000..fae7feeec2df --- /dev/null +++ b/prdoc/pr_6979.prdoc @@ -0,0 +1,8 @@ +title: Update prometheus binding failure logging format +doc: +- audience: Node Dev + description: |- + Using `{:#?}` for the error details is a bit annoying, this change makes a more consistent formatting style for error messages. +crates: +- name: substrate-prometheus-endpoint + bump: patch diff --git a/substrate/utils/prometheus/src/lib.rs b/substrate/utils/prometheus/src/lib.rs index 5edac2e6650f..ae39cb4a7dd3 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) })?;