Commit e86a45c3 authored by Michael Ott's avatar Michael Ott
Browse files

Add debug output for InfluxDB

parent 27d43ecc
......@@ -225,6 +225,9 @@ void CARestAPI::POST_write(endpointArgs) {
}
} else {
LOG(debug) << "influx: unknown measurement " << measurement;
#ifdef DEBUG
LOG(debug) << "influx line: " << line;
#endif
}
}
}
......
......@@ -811,19 +811,20 @@ int main(int argc, char* const argv[]) {
LOG(info) << "InfluxDB Settings:";
for (auto &m: config.influxMap) {
LOG(info) << " Measurement: " << m.first;
LOG(info) << " Tag: " << m.second.tag;
LOG(info) << " MQTT-Prefix: " << m.second.mqttPrefix;
LOG(info) << " Tag: " << m.second.tag;
if ((m.second.tagRegex.size() > 0) && (m.second.tagSubstitution.size() > 0))
if (m.second.tagSubstitution != "&") {
LOG(info) << " TagFilter: s/" << m.second.tagRegex.str() << "/" << m.second.tagSubstitution << "/";
LOG(info) << " TagFilter: s/" << m.second.tagRegex.str() << "/" << m.second.tagSubstitution << "/";
} else {
LOG(info) << " TagFilter: " << m.second.tagRegex.str();
LOG(info) << " TagFilter: " << m.second.tagRegex.str();
}
if (m.second.fields.size() > 0) {
stringstream ss;
copy(m.second.fields.begin(), m.second.fields.end(), ostream_iterator<std::string>(ss, ","));
string fields = ss.str();
fields.pop_back();
LOG(info) << " Fields: " << fields;
LOG(info) << " Fields: " << fields;
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment