From 2360dc00538b97229fbf3829fbe48ad42b38daf2 Mon Sep 17 00:00:00 2001 From: Peter Nguyen Date: Wed, 18 Sep 2024 12:50:17 -0700 Subject: [PATCH] Add getProperty() to OwnFilteringChannel.h and clean up debug comments in .cpp --- src/Loggers/OwnFilteringChannel.cpp | 4 ---- src/Loggers/OwnFilteringChannel.h | 7 +++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Loggers/OwnFilteringChannel.cpp b/src/Loggers/OwnFilteringChannel.cpp index 5feaf9af084..850de858a5f 100644 --- a/src/Loggers/OwnFilteringChannel.cpp +++ b/src/Loggers/OwnFilteringChannel.cpp @@ -1,6 +1,5 @@ #include "OwnFilteringChannel.h" #include -// #include // 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; } diff --git a/src/Loggers/OwnFilteringChannel.h b/src/Loggers/OwnFilteringChannel.h index 74ee57a8419..0d8cff493a0 100644 --- a/src/Loggers/OwnFilteringChannel.h +++ b/src/Loggers/OwnFilteringChannel.h @@ -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;