File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,15 +99,21 @@ namespace OpenWifi {
9999 .LastUpdate = Utils::Now ()};
100100
101101 auto s1 = MakeServiceListString (Services_);
102+ auto PreviousSize = Services_.size ();
102103 Services_[PrivateEndPoint] = ServiceInfo;
104+ auto CurrentSize = Services_.size ();
103105 if (Event == KafkaTopics::ServiceEvents::EVENT_JOIN ) {
104- poco_information (
105- BusLogger,
106- fmt::format (
107- " Service {} ID={} is joining the system. old={}" ,
108- Object->get (KafkaTopics::ServiceEvents::Fields::PRIVATE )
109- .toString (),
110- ID , s1));
106+ if (!s1.empty ()) {
107+ poco_information (
108+ BusLogger,
109+ fmt::format (
110+ " Service {} ID={} is joining the system." ,
111+ Object
112+ ->get (
113+ KafkaTopics::ServiceEvents::Fields::PRIVATE )
114+ .toString (),
115+ ID ));
116+ }
111117 std::string SvcList;
112118 for (const auto &Svc : Services_) {
113119 if (SvcList.empty ())
@@ -118,6 +124,15 @@ namespace OpenWifi {
118124 poco_information (
119125 BusLogger,
120126 fmt::format (" Current list of microservices: {}" , SvcList));
127+ } else if (CurrentSize!=PreviousSize) {
128+ poco_information (
129+ BusLogger,
130+ fmt::format (
131+ " Service {} ID={} is being added back in." ,
132+ Object
133+ ->get (KafkaTopics::ServiceEvents::Fields::PRIVATE )
134+ .toString (),
135+ ID ));
121136 }
122137 }
123138 } else {
You can’t perform that action at this time.
0 commit comments