mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Make JSON audit logging a configurable option
Remove compile-time setting for generating audit logs as JSON, creating a new config option (SecAuditLogFormat). sec_audit_logger is now a wrapper for sec_audit_logger_json or sec_audit_logger_native. This has the disadvantage of making the audit log generation code harder to maintain, but the logger function itself now is no longer pepper with binary branches.
This commit is contained in:
committed by
Felipe Zimmerle
parent
dd79bea0b4
commit
7a39b4b5b9
18
configure.ac
18
configure.ac
@@ -275,22 +275,6 @@ if test "$build_docs" -eq 1; then
|
||||
TOPLEVEL_SUBDIRS="$TOPLEVEL_SUBDIRS docs"
|
||||
fi
|
||||
|
||||
# Add JSON audit logging
|
||||
AC_ARG_ENABLE(json-logging,
|
||||
AS_HELP_STRING([--enabled-json-logging],
|
||||
[Enable JSON audit logging.]),
|
||||
[
|
||||
if test "$enableval" != "no"; then
|
||||
json_logging='-DWITH_JSON_LOGGING'
|
||||
MODSEC_EXTRA_CFLAGS="$MODSEC_EXTRA_CFLAGS $json_logging"
|
||||
else
|
||||
json_logging=''
|
||||
fi
|
||||
],
|
||||
[
|
||||
json_logging=''
|
||||
])
|
||||
|
||||
# Add PCRE Studying
|
||||
|
||||
AC_ARG_ENABLE(pcre-study,
|
||||
@@ -674,7 +658,7 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
MODSEC_EXTRA_CFLAGS="$json_logging $pcre_study $pcre_match_limit $pcre_match_limit_recursion $pcre_jit $request_early $htaccess_config $lua_cache $debug_conf $debug_cache $debug_acmp $debug_mem $perf_meas $modsec_api $cpu_type"
|
||||
MODSEC_EXTRA_CFLAGS="$pcre_study $pcre_match_limit $pcre_match_limit_recursion $pcre_jit $request_early $htaccess_config $lua_cache $debug_conf $debug_cache $debug_acmp $debug_mem $perf_meas $modsec_api $cpu_type"
|
||||
APXS_WRAPPER=build/apxs-wrapper
|
||||
APXS_EXTRA_CFLAGS=""
|
||||
for f in $EXTRA_CFLAGS; do
|
||||
|
Reference in New Issue
Block a user