Commit 585aa8fc authored by Micha Mueller's avatar Micha Mueller
Browse files

Add printConfig to Sysfs plugin

parent 4d50efd6
......@@ -64,6 +64,15 @@ public:
void setRegex(boost::regex regx) { _regx = regx; }
void setSubstitution(const std::string& substitution) { _substitution = substitution; }
void printConfig(LOG_LEVEL ll, LOGGER& lg) {
if (_filter) {
LOG_VAR(ll) << " Using regular expression as filter";
LOG_VAR(ll) << " Substitution: " << _substitution;
} else {
LOG_VAR(ll) << " Not using any filter";
}
}
protected:
bool _filter;
boost::regex _regx;
......
......@@ -117,3 +117,7 @@ void SysfsSensorGroup::readAsync() {
}
_pendingTasks--;
}
void SysfsSensorGroup::printConfig(LOG_LEVEL ll) {
LOG_VAR(ll) << " File path: " << _path;
}
......@@ -27,6 +27,8 @@ public:
// const std::string& getPath() const { return _path; }
// FILE* getFile() const { return _file; }
void printConfig(LOG_LEVEL ll) override;
private:
void read() override;
void readAsync() override;
......
Supports Markdown
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