@@ -285,6 +285,31 @@ AP_DECLARE(void) ap_log_error_(const char *file, int line, int module_index,
285285modsecLogHook (modsecLogObj ,level ,errstr );
286286}
287287
288+ #if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER < 3
289+ AP_DECLARE (void )ap_log_rerror (const char * file ,int line ,int level ,
290+ apr_status_t status ,const request_rec * r ,
291+ const char * fmt , ...)
292+ // __attribute__((format(printf,6,7)))
293+ #else
294+ AP_DECLARE (void )ap_log_rerror_ (const char * file ,int line ,int module_index ,
295+ int level ,apr_status_t status ,
296+ const request_rec * r ,const char * fmt , ...)
297+ // __attribute__((format(printf,7,8)))
298+ #endif
299+ {
300+ va_list args ;
301+ char errstr [MAX_STRING_LEN ];
302+
303+ va_start (args ,fmt );
304+
305+ apr_vsnprintf (errstr ,MAX_STRING_LEN ,fmt ,args );
306+
307+ va_end (args );
308+
309+ if (modsecLogHook != NULL )
310+ modsecLogHook (modsecLogObj ,level ,errstr );
311+ }
312+
288313#if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER < 3
289314AP_DECLARE (void )ap_log_perror (const char * file ,int line ,int level ,
290315apr_status_t status ,apr_pool_t * p ,