Fix getClientLogs function and log viewer on dashboard

This commit is contained in:
Ben Gräf 2018-07-27 21:21:33 +02:00
parent 59d9c7cab1
commit 9380880b58
2 changed files with 6 additions and 7 deletions

View file

@ -288,9 +288,8 @@ unsigned Service::getClientLog(const std::string& clientId, std::string& resp)
data << m_row.c_str() << std::endl;
}
LOG_INFO("LOG: %s", data.str().c_str());
respDocument.AddMember("client_log", rapidjson::StringRef(data.str().c_str()), allocator);
std::string log = data.str();
respDocument.AddMember("client_log", rapidjson::StringRef(log.c_str()), allocator);
rapidjson::StringBuffer buffer(0, 4096);
rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);