From 1232f3ac58f60fa84c653a79a1eedaeb0ebbe6eb Mon Sep 17 00:00:00 2001 From: stephb9959 Date: Mon, 4 Dec 2023 08:31:08 -0800 Subject: [PATCH] https://telecominfraproject.atlassian.net/browse/WIFI-13172 Signed-off-by: stephb9959 --- src/framework/MicroService.cpp | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/framework/MicroService.cpp b/src/framework/MicroService.cpp index fabc65b..13f89fb 100644 --- a/src/framework/MicroService.cpp +++ b/src/framework/MicroService.cpp @@ -99,15 +99,21 @@ namespace OpenWifi { .LastUpdate = Utils::Now()}; auto s1 = MakeServiceListString(Services_); + auto PreviousSize = Services_.size(); Services_[PrivateEndPoint] = ServiceInfo; + auto CurrentSize = Services_.size(); if(Event == KafkaTopics::ServiceEvents::EVENT_JOIN) { - poco_information( - BusLogger, - fmt::format( - "Service {} ID={} is joining the system. old={}", - Object->get(KafkaTopics::ServiceEvents::Fields::PRIVATE) - .toString(), - ID, s1)); + if(!s1.empty()) { + poco_information( + BusLogger, + fmt::format( + "Service {} ID={} is joining the system.", + Object + ->get( + KafkaTopics::ServiceEvents::Fields::PRIVATE) + .toString(), + ID)); + } std::string SvcList; for (const auto &Svc : Services_) { if (SvcList.empty()) @@ -118,6 +124,15 @@ namespace OpenWifi { poco_information( BusLogger, fmt::format("Current list of microservices: {}", SvcList)); + } else if(CurrentSize!=PreviousSize) { + poco_information( + BusLogger, + fmt::format( + "Service {} ID={} is being added back in.", + Object + ->get(KafkaTopics::ServiceEvents::Fields::PRIVATE) + .toString(), + ID)); } } } else {