mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-09 17:14:47 +00:00
Add getProperty() to OwnFilteringChannel.h and clean up debug comments in .cpp
This commit is contained in:
parent
efd74d721d
commit
2360dc0053
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user