Skip to content
Snippets Groups Projects
Unverified Commit ca781792 authored by Liu-Cheng Xu's avatar Liu-Cheng Xu Committed by GitHub
Browse files

Update prometheus binding failure logging format (#6979)


Using `{:#?}` for the error details is a bit annoying, this change makes
a more consistent formatting style for error messages.

---------

Co-authored-by: default avatarBastian Köcher <git@kchr.de>
Co-authored-by: command-bot <>
Co-authored-by: default avatarSebastian Kunert <skunert49@gmail.com>
parent 88d900af
No related merge requests found
Pipeline #510243 waiting for manual action with stages
in 1 hour, 2 minutes, and 47 seconds
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
......@@ -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)
})?;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment