mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
synced 2025-11-02 19:57:46 +00:00
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
This commit is contained in:
@@ -69,7 +69,7 @@ namespace OpenWifi {
|
|||||||
if (Event == KafkaTopics::ServiceEvents::EVENT_LEAVE) {
|
if (Event == KafkaTopics::ServiceEvents::EVENT_LEAVE) {
|
||||||
Services_.erase(PrivateEndPoint);
|
Services_.erase(PrivateEndPoint);
|
||||||
poco_information(
|
poco_information(
|
||||||
logger(),
|
Logger_,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Service {} ID={} leaving system.",
|
"Service {} ID={} leaving system.",
|
||||||
Object->get(KafkaTopics::ServiceEvents::Fields::PRIVATE)
|
Object->get(KafkaTopics::ServiceEvents::Fields::PRIVATE)
|
||||||
@@ -99,7 +99,7 @@ namespace OpenWifi {
|
|||||||
Services_[PrivateEndPoint] = ServiceInfo;
|
Services_[PrivateEndPoint] = ServiceInfo;
|
||||||
if(Event == KafkaTopics::ServiceEvents::EVENT_JOIN) {
|
if(Event == KafkaTopics::ServiceEvents::EVENT_JOIN) {
|
||||||
poco_information(
|
poco_information(
|
||||||
logger(),
|
Logger_,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"Service {} ID={} is joining the system. old={}",
|
"Service {} ID={} is joining the system. old={}",
|
||||||
Object->get(KafkaTopics::ServiceEvents::Fields::PRIVATE)
|
Object->get(KafkaTopics::ServiceEvents::Fields::PRIVATE)
|
||||||
@@ -113,13 +113,13 @@ namespace OpenWifi {
|
|||||||
SvcList += ", " + Svc.second.Type;
|
SvcList += ", " + Svc.second.Type;
|
||||||
}
|
}
|
||||||
poco_information(
|
poco_information(
|
||||||
logger(),
|
Logger_,
|
||||||
fmt::format("Current list of microservices: {}", SvcList));
|
fmt::format("Current list of microservices: {}", SvcList));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
poco_information(
|
poco_information(
|
||||||
logger(),
|
Logger_,
|
||||||
fmt::format("KAFKA-MSG: invalid event '{}', missing a field.",
|
fmt::format("KAFKA-MSG: invalid event '{}', missing a field.",
|
||||||
Event));
|
Event));
|
||||||
}
|
}
|
||||||
@@ -131,18 +131,18 @@ namespace OpenWifi {
|
|||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
poco_information(
|
poco_information(
|
||||||
logger(),
|
Logger_,
|
||||||
fmt::format("KAFKA-MSG: invalid event '{}', missing token", Event));
|
fmt::format("KAFKA-MSG: invalid event '{}', missing token", Event));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
poco_information(logger(),
|
poco_information(Logger_,
|
||||||
fmt::format("Unknown Event: {} Source: {}", Event, ID));
|
fmt::format("Unknown Event: {} Source: {}", Event, ID));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
Object->stringify(std::cout);
|
Object->stringify(std::cout);
|
||||||
poco_error(logger(), fmt::format("Bad bus message: {}", os.str()));
|
poco_error(Logger_, fmt::format("Bad bus message: {}", os.str()));
|
||||||
}
|
}
|
||||||
|
|
||||||
auto ServiceHint = Services_.begin();
|
auto ServiceHint = Services_.begin();
|
||||||
@@ -162,7 +162,7 @@ namespace OpenWifi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (const Poco::Exception &E) {
|
} catch (const Poco::Exception &E) {
|
||||||
logger().log(E);
|
Logger_.log(E);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -431,7 +431,7 @@ namespace OpenWifi {
|
|||||||
try {
|
try {
|
||||||
DataDir.createDirectory();
|
DataDir.createDirectory();
|
||||||
} catch (const Poco::Exception &E) {
|
} catch (const Poco::Exception &E) {
|
||||||
logger().log(E);
|
Logger_.log(E);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
WWWAssetsDir_ = ConfigPath("openwifi.restapi.wwwassets", "");
|
WWWAssetsDir_ = ConfigPath("openwifi.restapi.wwwassets", "");
|
||||||
@@ -716,7 +716,7 @@ namespace OpenWifi {
|
|||||||
auto APIKEY = Request.get("X-API-KEY");
|
auto APIKEY = Request.get("X-API-KEY");
|
||||||
return APIKEY == MyHash_;
|
return APIKEY == MyHash_;
|
||||||
} catch (const Poco::Exception &E) {
|
} catch (const Poco::Exception &E) {
|
||||||
logger().log(E);
|
Logger_.log(E);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user