From 12562bb3c4fff6954816d2bbb12e2e25273daa62 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 10 Feb 2021 16:30:22 +0100 Subject: [PATCH] Use log level error to report telemetry (#8097) This fix the issue when running the node with -lwarn, the telemetry cannot be initialized properly. --- client/telemetry/src/lib.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/telemetry/src/lib.rs b/client/telemetry/src/lib.rs index f1038456fc352..b398ee86de4ec 100644 --- a/client/telemetry/src/lib.rs +++ b/client/telemetry/src/lib.rs @@ -86,7 +86,7 @@ impl TelemetrySpan { /// Constructs a new [`TelemetrySpan`]. pub fn new() -> Self { - Self(tracing::info_span!(TELEMETRY_LOG_SPAN)) + Self(tracing::error_span!(TELEMETRY_LOG_SPAN)) } /// Return a clone of the underlying `tracing::Span` instance. @@ -230,6 +230,11 @@ impl TelemetryWorker { }; for (addr, verbosity) in endpoints { + log::trace!( + target: "telemetry", + "Initializing telemetry for: {:?}", + addr, + ); node_map .entry(id.clone()) .or_default()