From 1173547efb7f4e6c965749c51e4140ca750d4449 Mon Sep 17 00:00:00 2001 From: OlivierHecart Date: Mon, 5 Feb 2024 17:36:55 +0100 Subject: [PATCH] Improve routing logging --- zenoh/src/net/routing/dispatcher/pubsub.rs | 14 ++++++-------- zenoh/src/net/routing/dispatcher/queries.rs | 6 ++++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/zenoh/src/net/routing/dispatcher/pubsub.rs b/zenoh/src/net/routing/dispatcher/pubsub.rs index 4de75f4854..7d9eff1a21 100644 --- a/zenoh/src/net/routing/dispatcher/pubsub.rs +++ b/zenoh/src/net/routing/dispatcher/pubsub.rs @@ -118,14 +118,12 @@ pub(crate) fn undeclare_subscription( Some(prefix) => match Resource::get_resource(prefix, expr.suffix.as_ref()) { Some(res) => Some(res), None => { - if log::log_enabled!(log::Level::Error) { - log::error!( - "{} Undeclare unknown subscriber {}{}!", - face, - prefix.expr(), - expr.suffix - ); - } + log::error!( + "{} Undeclare unknown subscriber {}{}!", + face, + prefix.expr(), + expr.suffix + ); return; } }, diff --git a/zenoh/src/net/routing/dispatcher/queries.rs b/zenoh/src/net/routing/dispatcher/queries.rs index f1a93212cf..efb8d43df8 100644 --- a/zenoh/src/net/routing/dispatcher/queries.rs +++ b/zenoh/src/net/routing/dispatcher/queries.rs @@ -57,8 +57,9 @@ pub(crate) fn declare_queryable( { Some(mut prefix) => { log::debug!( - "{} Declare queryable ({}{})", + "{} Declare queryable {} ({}{})", face, + id, prefix.expr(), expr.suffix ); @@ -101,8 +102,9 @@ pub(crate) fn declare_queryable( drop(wtables); } None => log::error!( - "{} Declare queryable for unknown scope {}!", + "{} Declare queryable {} for unknown scope {}!", face, + id, expr.scope ), }