Cleanup debug log output: add rev to 'Invoking rule' line, remove clearing mem pool line.

This commit is contained in:
brectanus 2007-05-02 16:00:20 +00:00
parent fa13b02f7f
commit 0c234c115e

View File

@ -694,14 +694,18 @@ apr_status_t msre_ruleset_process_phase(msre_ruleset *ruleset, modsec_rec *msr)
apr_pool_t *p = msr->mp; apr_pool_t *p = msr->mp;
const char *fn = NULL; const char *fn = NULL;
const char *id = NULL; const char *id = NULL;
const char *rev = NULL;
if (rule->filename != 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) { 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.", if (rule->actionset != NULL && rule->actionset->rev != NULL) {
rule, (fn ? fn : ""), (id ? id : "")); 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); rc = msre_rule_process(rule, msr);
@ -1282,9 +1286,6 @@ apr_status_t msre_rule_process(msre_rule *rule, modsec_rec *msr) {
} }
else { else {
mptmp = msr->msc_rule_mptmp; mptmp = msr->msc_rule_mptmp;
if (msr->txcfg->debuglog_level >= 9) {
msr_log(msr, 9, "Clearing rule processing memory pool");
}
apr_pool_clear(mptmp); apr_pool_clear(mptmp);
} }