mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-19 16:20:50 +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 "OwnFilteringChannel.h"
|
||||||
#include <Poco/RegularExpression.h>
|
#include <Poco/RegularExpression.h>
|
||||||
// #include <iostream> // TODO
|
|
||||||
|
|
||||||
|
|
||||||
namespace DB
|
namespace DB
|
||||||
@ -30,7 +29,6 @@ bool OwnFilteringChannel::regexpFilteredOut(std::string text) const
|
|||||||
Poco::RegularExpression positive_regexp(positive_pattern);
|
Poco::RegularExpression positive_regexp(positive_pattern);
|
||||||
if (!positive_regexp.match(text))
|
if (!positive_regexp.match(text))
|
||||||
{
|
{
|
||||||
// std::cout << "Skipping Message: " << text << "| due to positive regexp: " << positive_pattern << std::endl;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -40,11 +38,9 @@ bool OwnFilteringChannel::regexpFilteredOut(std::string text) const
|
|||||||
Poco::RegularExpression negative_regexp(negative_pattern);
|
Poco::RegularExpression negative_regexp(negative_pattern);
|
||||||
if (negative_regexp.match(text))
|
if (negative_regexp.match(text))
|
||||||
{
|
{
|
||||||
// std::cout << "Skipping Message: " << text << "| due to negative regexp: " << negative_pattern << std::endl;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// std::cout << "THE FOLLOWING MESSAGE PASSED using positive: " << positive_pattern << " and negative: " << negative_pattern << std::endl;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,6 +49,13 @@ public:
|
|||||||
pChannel->setProperty(name, value);
|
pChannel->setProperty(name, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string getProperty(const std::string& name) const override
|
||||||
|
{
|
||||||
|
if (pChannel)
|
||||||
|
return pChannel->getProperty(name);
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool regexpFilteredOut(std::string text) const;
|
bool regexpFilteredOut(std::string text) const;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user