From b50326fb2094c0700105a09de3db09903c6de3dc Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 21 Jan 2021 10:48:05 +0100 Subject: [PATCH] Fixes #3382 - Logging of email postmaster filter is to extensive with many more than 10 filters. --- app/models/channel/filter/database.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/models/channel/filter/database.rb b/app/models/channel/filter/database.rb index 71315028b..45c322e13 100644 --- a/app/models/channel/filter/database.rb +++ b/app/models/channel/filter/database.rb @@ -22,12 +22,16 @@ module Channel::Filter::Database when 'contains not' if value.present? && Channel::Filter::Match::EmailRegex.match(value: value, match_rule: match_rule) all_matches_ok = false - Rails.logger.info " matching #{key.downcase}:'#{value}' on #{match_rule}, but shoud not" + Rails.logger.debug " not matching #{key.downcase}:'#{value}' contains not #{match_rule}" + else + Rails.logger.info " matching: #{key.downcase}:'#{value}' contains not #{match_rule}" end when 'contains' if value.blank? || !Channel::Filter::Match::EmailRegex.match(value: value, match_rule: match_rule) all_matches_ok = false - Rails.logger.info " not matching #{key.downcase}:'#{value}' on #{match_rule}, but should" + Rails.logger.debug " not matching #{key.downcase}:'#{value}' contains #{match_rule}" + else + Rails.logger.info " matching #{key.downcase}:'#{value}' contains #{match_rule}" end else all_matches_ok = false