|
|
|
|
@ -884,13 +884,14 @@ void* FNENetwork::threadedNetworkRx(void* arg)
|
|
|
|
|
::memcpy(rawPayload, req->buffer + 11U, req->length - 11U);
|
|
|
|
|
std::string payload(rawPayload, rawPayload + (req->length - 11U));
|
|
|
|
|
|
|
|
|
|
::ActivityLog("%u %s", peerId, payload.c_str());
|
|
|
|
|
::ActivityLog("%u (%8s) %s", peerId, connection->identity().c_str(), payload.c_str());
|
|
|
|
|
|
|
|
|
|
// report activity log to InfluxDB
|
|
|
|
|
if (network->m_enableInfluxDB) {
|
|
|
|
|
influxdb::QueryBuilder()
|
|
|
|
|
.meas("activity")
|
|
|
|
|
.tag("peerId", std::to_string(peerId))
|
|
|
|
|
.field("identity", connection->identity())
|
|
|
|
|
.field("msg", payload)
|
|
|
|
|
.timestamp(std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::system_clock::now().time_since_epoch()).count())
|
|
|
|
|
.request(network->m_influxServer);
|
|
|
|
|
@ -919,7 +920,7 @@ void* FNENetwork::threadedNetworkRx(void* arg)
|
|
|
|
|
|
|
|
|
|
bool currState = g_disableTimeDisplay;
|
|
|
|
|
g_disableTimeDisplay = true;
|
|
|
|
|
::Log(9999U, nullptr, "%u %s", peerId, payload.c_str());
|
|
|
|
|
::Log(9999U, nullptr, "%u (%8s) %s", peerId, connection->identity().c_str(), payload.c_str());
|
|
|
|
|
g_disableTimeDisplay = currState;
|
|
|
|
|
|
|
|
|
|
// report diagnostic log to InfluxDB
|
|
|
|
|
@ -927,6 +928,7 @@ void* FNENetwork::threadedNetworkRx(void* arg)
|
|
|
|
|
influxdb::QueryBuilder()
|
|
|
|
|
.meas("diag")
|
|
|
|
|
.tag("peerId", std::to_string(peerId))
|
|
|
|
|
.field("identity", connection->identity())
|
|
|
|
|
.field("msg", payload)
|
|
|
|
|
.timestamp(std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::system_clock::now().time_since_epoch()).count())
|
|
|
|
|
.request(network->m_influxServer);
|
|
|
|
|
|