Skip to content

Commit f32be70

Browse files
author
Marc Stern
committed
Use standard httpd logging format in error log
1 parent 28b6e1d commit f32be70

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

apache2/mod_security2.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,17 @@ static int server_limit, thread_limit;
103103
*
104104
* \param mp Pointer to memory pool
105105
*/
106-
static void version(apr_pool_t *mp) {
106+
static void version(apr_pool_t *mp, server_rec* s) {
107107
char *pcre_vrs = NULL;
108108
const char *pcre_loaded_vrs = NULL;
109109
char pcre2_loaded_vrs_buffer[80] ={0};
110110

111-
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
111+
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s,
112112
"ModSecurity: APR compiled version=\"%s\"; "
113113
"loaded version=\"%s\"", APR_VERSION_STRING, apr_version_string());
114114

115115
if (strstr(apr_version_string(), APR_VERSION_STRING) == NULL) {
116-
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, "ModSecurity: Loaded APR do not match with compiled!");
116+
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, "ModSecurity: Loaded APR do not match with compiled!");
117117
}
118118

119119
#ifdef WITH_PCRE2
@@ -134,21 +134,21 @@ static void version(apr_pool_t *mp) {
134134
"loaded version=\"%s\"", pcre_vrs, pcre_loaded_vrs);
135135

136136
if (strstr(pcre_loaded_vrs,pcre_vrs) == NULL) {
137-
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, "ModSecurity: Loaded PCRE do not match with compiled!");
137+
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, "ModSecurity: Loaded PCRE do not match with compiled!");
138138
}
139139

140140
/* Lua version function was removed in current 5.1. Need to check in future versions if it's back */
141141
#if defined(WITH_LUA)
142-
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
142+
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s,
143143
"ModSecurity: LUA compiled version=\"%s\"", LUA_VERSION);
144144
#endif /* WITH_LUA */
145145

146146
#ifdef WITH_YAJL
147-
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
147+
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s,
148148
"ModSecurity: YAJL compiled version=\"%d.%d.%d\"", YAJL_MAJOR, YAJL_MINOR, YAJL_MICRO);
149149
#endif /* WITH_YAJL */
150150

151-
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
151+
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s,
152152
"ModSecurity: LIBXML compiled version=\"%s\"", LIBXML_DOTTED_VERSION);
153153
}
154154

@@ -778,7 +778,7 @@ static int hook_post_config(apr_pool_t *mp, apr_pool_t *mp_log, apr_pool_t *mp_t
778778
ap_log_error(APLOG_MARK, APLOG_NOTICE | APLOG_NOERRNO, 0, s,
779779
"%s configured.", MODSEC_MODULE_NAME_FULL);
780780

781-
version(mp);
781+
version(mp, s);
782782

783783
/* If we've changed the server signature make note of the original. */
784784
if (new_server_signature != NULL) {

0 commit comments

Comments
 (0)