From 0c234c115e0e5691127e5dceae7827f775b4791b Mon Sep 17 00:00:00 2001 From: brectanus Date: Wed, 2 May 2007 16:00:20 +0000 Subject: [PATCH] Cleanup debug log output: add rev to 'Invoking rule' line, remove clearing mem pool line. --- apache2/re.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/apache2/re.c b/apache2/re.c index 820a9950..c26d479c 100644 --- a/apache2/re.c +++ b/apache2/re.c @@ -694,14 +694,18 @@ apr_status_t msre_ruleset_process_phase(msre_ruleset *ruleset, modsec_rec *msr) apr_pool_t *p = msr->mp; const char *fn = NULL; const char *id = NULL; + const char *rev = NULL; if (rule->filename != NULL) { - fn = apr_psprintf(p, " [file \"%s\"][line \"%d\"]", rule->filename, rule->line_num); + fn = apr_psprintf(p, " [file \"%s\"] [line \"%d\"]", rule->filename, rule->line_num); } if (rule->actionset != NULL && rule->actionset->id != NULL) { - id = apr_psprintf(p, "[id \"%s\"]", rule->actionset->id); + id = apr_psprintf(p, " [id \"%s\"]", rule->actionset->id); } - msr_log(msr, 4, "Recipe: Invoking rule %x%s%s.", - rule, (fn ? fn : ""), (id ? id : "")); + if (rule->actionset != NULL && rule->actionset->rev != NULL) { + rev = apr_psprintf(p, " [rev \"%s\"]", rule->actionset->rev); + } + msr_log(msr, 4, "Recipe: Invoking rule %x%s%s%s.", + rule, (fn ? fn : ""), (id ? id : ""), (rev ? rev : "")); } rc = msre_rule_process(rule, msr); @@ -1282,9 +1286,6 @@ apr_status_t msre_rule_process(msre_rule *rule, modsec_rec *msr) { } else { mptmp = msr->msc_rule_mptmp; - if (msr->txcfg->debuglog_level >= 9) { - msr_log(msr, 9, "Clearing rule processing memory pool"); - } apr_pool_clear(mptmp); }