Add SecAuditLog2 directive (trac #102)

This commit is contained in:
brectanus
2007-04-25 20:46:23 +00:00
parent e556a914f9
commit d9a26780ab
5 changed files with 103 additions and 2 deletions

View File

@@ -886,5 +886,16 @@ void sec_audit_logger(modsec_rec *msr) {
if (text == NULL) return;
nbytes = strlen(text);
if (msr->txcfg->debuglog_level >= 9) {
msr_log(msr, 9, "Audit Log: Writing %d bytes to primary concurrent index", nbytes);
}
apr_file_write_full(msr->txcfg->auditlog_fd, text, nbytes, &nbytes_written);
/* Write to the secondary audit log if we have one */
if (msr->txcfg->auditlog2_fd != NULL) {
if (msr->txcfg->debuglog_level >= 9) {
msr_log(msr, 9, "Audit Log: Writing %d bytes to secondary concurrent index", nbytes);
}
apr_file_write_full(msr->txcfg->auditlog2_fd, text, nbytes, &nbytes_written);
}
}