From a627e96c75f9737bdc540698a8755772894e5386 Mon Sep 17 00:00:00 2001 From: brectanus Date: Thu, 17 May 2007 12:02:59 +0000 Subject: [PATCH] Lessen "capture" debug log messages. --- CHANGES | 2 ++ apache2/re_operators.c | 12 +++--------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/CHANGES b/CHANGES index a545c6f5..3e96ad9e 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,8 @@ ?? ??? 2007 - 2.2.0-trunk ------------------------- + * Remove excessive debug log entries about "capture" action. + * Fixed decoding full-width unicode in t:urlDecodeUni. * Only calculate debugging vars when we are debugging (more to come). diff --git a/apache2/re_operators.c b/apache2/re_operators.c index db0071f8..7cc2c27a 100644 --- a/apache2/re_operators.c +++ b/apache2/re_operators.c @@ -109,18 +109,12 @@ static int msre_op_rx_execute(modsec_rec *msr, msre_rule *rule, msre_var *var, c /* Are we supposed to capture subexpressions? */ capture = apr_table_get(rule->actionset->actions, "capture") ? 1 : 0; - /* Warn when the regex captures but "capture" is not set */ - if (msr->txcfg->debuglog_level >= 4) { + /* Show when the regex captures but "capture" is not set */ + if (msr->txcfg->debuglog_level >= 6) { int capcount = 0; rc = msc_fullinfo(regex, PCRE_INFO_CAPTURECOUNT, &capcount); if ((capture == 0) && (capcount > 0)) { - msr_log(msr, 4, "Ignoring regex captures since \"capture\" action is not enabled."); - } - if ((capture == 1) && (capcount == 0)) { - msr_log(msr, 5, "The \"capture\" action is enabled, but the regex does not have explicit captures."); - } - if ((capture == 0) && (capcount > 0)) { - msr_log(msr, 6, "The \"capture\" action is not enabled, but the regex contains captures."); + msr_log(msr, 6, "Ignoring regex captures since \"capture\" action is not enabled."); } }