mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Use standard httpd logging format in error log
This commit is contained in:
parent
28b6e1d7d0
commit
f32be70793
@ -103,17 +103,17 @@ static int server_limit, thread_limit;
|
||||
*
|
||||
* \param mp Pointer to memory pool
|
||||
*/
|
||||
static void version(apr_pool_t *mp) {
|
||||
static void version(apr_pool_t *mp, server_rec* s) {
|
||||
char *pcre_vrs = NULL;
|
||||
const char *pcre_loaded_vrs = NULL;
|
||||
char pcre2_loaded_vrs_buffer[80] ={0};
|
||||
|
||||
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
|
||||
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s,
|
||||
"ModSecurity: APR compiled version=\"%s\"; "
|
||||
"loaded version=\"%s\"", APR_VERSION_STRING, apr_version_string());
|
||||
|
||||
if (strstr(apr_version_string(), APR_VERSION_STRING) == NULL) {
|
||||
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, "ModSecurity: Loaded APR do not match with compiled!");
|
||||
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, "ModSecurity: Loaded APR do not match with compiled!");
|
||||
}
|
||||
|
||||
#ifdef WITH_PCRE2
|
||||
@ -134,21 +134,21 @@ static void version(apr_pool_t *mp) {
|
||||
"loaded version=\"%s\"", pcre_vrs, pcre_loaded_vrs);
|
||||
|
||||
if (strstr(pcre_loaded_vrs,pcre_vrs) == NULL) {
|
||||
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, "ModSecurity: Loaded PCRE do not match with compiled!");
|
||||
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, "ModSecurity: Loaded PCRE do not match with compiled!");
|
||||
}
|
||||
|
||||
/* Lua version function was removed in current 5.1. Need to check in future versions if it's back */
|
||||
#if defined(WITH_LUA)
|
||||
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
|
||||
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s,
|
||||
"ModSecurity: LUA compiled version=\"%s\"", LUA_VERSION);
|
||||
#endif /* WITH_LUA */
|
||||
|
||||
#ifdef WITH_YAJL
|
||||
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
|
||||
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s,
|
||||
"ModSecurity: YAJL compiled version=\"%d.%d.%d\"", YAJL_MAJOR, YAJL_MINOR, YAJL_MICRO);
|
||||
#endif /* WITH_YAJL */
|
||||
|
||||
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
|
||||
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s,
|
||||
"ModSecurity: LIBXML compiled version=\"%s\"", LIBXML_DOTTED_VERSION);
|
||||
}
|
||||
|
||||
@ -778,7 +778,7 @@ static int hook_post_config(apr_pool_t *mp, apr_pool_t *mp_log, apr_pool_t *mp_t
|
||||
ap_log_error(APLOG_MARK, APLOG_NOTICE | APLOG_NOERRNO, 0, s,
|
||||
"%s configured.", MODSEC_MODULE_NAME_FULL);
|
||||
|
||||
version(mp);
|
||||
version(mp, s);
|
||||
|
||||
/* If we've changed the server signature make note of the original. */
|
||||
if (new_server_signature != NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user