Commit 6344192d authored by Micha Mueller's avatar Micha Mueller
Browse files

Add printConfig to Procfs plugin

parent fe1ae484
......@@ -47,6 +47,16 @@ public:
void setCPUId(int i) { this->_cpuId = i; }
int getCPUId() { return this->_cpuId; }
void printConfig(LOG_LEVEL ll, LOGGER& lg) {
LOG_VAR(ll) << " Metric: " << _metric;
LOG_VAR(ll) << " CPU Id: " << _cpuId;
if (_perCPU) {
LOG_VAR(ll) << " perCPU: true";
} else {
LOG_VAR(ll) << " perCPU: false";
}
}
protected:
// The metric field is used to decouple the sensor's name from the corresponding metric contained within the proc file
......
......@@ -145,3 +145,14 @@ void ProcfsSensorGroup::readAsync() {
}
_pendingTasks--;
}
void ProcfsSensorGroup::printConfig(LOG_LEVEL ll) {
if (_parser) {
LOG_VAR(ll) << " Parser set";
} else {
LOG_VAR(ll) << " No Parser set!";
}
LOG_VAR(ll) << " Type: " << _type;
LOG_VAR(ll) << " Path: " << _path;
LOG_VAR(ll) << " MQTT start: " << _mqttStart;
}
......@@ -46,6 +46,8 @@ public:
std::vector<ProcfsSBPtr>& getDerivedSensors() { return this->_sensors; }
void replaceSensors(std::vector<ProcfsSBPtr> *newSensors);
void printConfig(LOG_LEVEL ll) override;
private:
// Methods inherited from SensorGroupTemplate
void read() override;
......
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