Add getProperty() to OwnFilteringChannel.h and clean up debug comments in .cpp

This commit is contained in:
Peter Nguyen 2024-09-18 12:50:17 -07:00
parent efd74d721d
commit 2360dc0053
2 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,5 @@
#include "OwnFilteringChannel.h"
#include <Poco/RegularExpression.h>
// #include <iostream> // TODO
namespace DB
@ -30,7 +29,6 @@ bool OwnFilteringChannel::regexpFilteredOut(std::string text) const
Poco::RegularExpression positive_regexp(positive_pattern);
if (!positive_regexp.match(text))
{
// std::cout << "Skipping Message: " << text << "| due to positive regexp: " << positive_pattern << std::endl;
return true;
}
}
@ -40,11 +38,9 @@ bool OwnFilteringChannel::regexpFilteredOut(std::string text) const
Poco::RegularExpression negative_regexp(negative_pattern);
if (negative_regexp.match(text))
{
// std::cout << "Skipping Message: " << text << "| due to negative regexp: " << negative_pattern << std::endl;
return true;
}
}
// std::cout << "THE FOLLOWING MESSAGE PASSED using positive: " << positive_pattern << " and negative: " << negative_pattern << std::endl;
return false;
}

View File

@ -49,6 +49,13 @@ public:
pChannel->setProperty(name, value);
}
std::string getProperty(const std::string& name) const override
{
if (pChannel)
return pChannel->getProperty(name);
return "";
}
private:
bool regexpFilteredOut(std::string text) const;