Browse Source

丰富日志

master
zhaohe 4 weeks ago
parent
commit
e9243c6f99
  1. 8
      appsrc/baseservice/iflytop_front_end_service/iflytop_front_end_service.cpp

8
appsrc/baseservice/iflytop_front_end_service/iflytop_front_end_service.cpp

@ -75,6 +75,12 @@ void IflytopFrontEndService::sendReport(json reportType, json report) {
report["messageId"] = UUID().toString();
report["messageType"] = "Report";
report["reportType"] = reportType;
string fromClass, fromFn;
try {
fromClass = report["fromClass"];
fromFn = report["fromFn"];
} catch (const std::exception& e) {
}
auto serverClients = m_server->getClients();
if (serverClients.size() != 0) {
@ -82,7 +88,7 @@ void IflytopFrontEndService::sendReport(json reportType, json report) {
}
for (auto& each : serverClients) {
if (each) {
logger->debug("send msg to clientId:{}", each->getUrl());
logger->debug("send msg to {}.{} clientId:{}", fromClass, fromFn, each->getUrl());
auto result = each->sendText(report.dump());
if (!result.success) {
logger->debug("send failed,clientId:{},error:{}", each->getUrl(), result.compressionError);

Loading…
Cancel
Save