mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Adds option to disable logging of stopwatches in audit log.
This commit is contained in:
committed by
Felipe Zimmerle
parent
41ae8db571
commit
7246998f09
@@ -1165,6 +1165,9 @@ void sec_audit_logger_json(modsec_rec *msr) {
|
||||
|
||||
|
||||
/* Stopwatch2 */
|
||||
#ifdef DLOG_NO_STOPWATCH
|
||||
if (msr->txcfg->debuglog_level >= 9)
|
||||
#endif
|
||||
format_performance_variables_json(msr, g);
|
||||
|
||||
/* Our response body does not contain chunks */
|
||||
@@ -1989,6 +1992,9 @@ void sec_audit_logger_native(modsec_rec *msr) {
|
||||
}
|
||||
|
||||
/* Stopwatch; left in for compatibility reasons */
|
||||
#ifdef DLOG_NO_STOPWATCH
|
||||
if (msr->txcfg->debuglog_level >= 9) {
|
||||
#endif
|
||||
text = apr_psprintf(msr->mp, "Stopwatch: %" APR_TIME_T_FMT " %" APR_TIME_T_FMT " (- - -)\n",
|
||||
msr->request_time, (now - msr->request_time));
|
||||
sec_auditlog_write(msr, text, strlen(text));
|
||||
@@ -2001,6 +2007,9 @@ void sec_audit_logger_native(modsec_rec *msr) {
|
||||
"; %s\n", msr->request_time, (now - msr->request_time), perf_all);
|
||||
sec_auditlog_write(msr, text, strlen(text));
|
||||
}
|
||||
#ifdef DLOG_NO_STOPWATCH
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Our response body does not contain chunks */
|
||||
/* ENH Only write this when the output was chunked. */
|
||||
|
Reference in New Issue
Block a user