@@ -285,6 +285,33 @@ AP_DECLARE(void) ap_log_error_(const char *file, int line, int module_index,
285
285
modsecLogHook (modsecLogObj , level , errstr );
286
286
}
287
287
288
+
289
+ #if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER < 3
290
+ AP_DECLARE (void ) ap_log_cerror (const char * file , int line , int level ,
291
+ apr_status_t status , const conn_rec * r ,
292
+ const char * fmt , ...)
293
+ // __attribute__((format(printf,6,7)))
294
+ #else
295
+ AP_DECLARE (void ) ap_log_cerror_ (const char * file , int line , int module_index ,
296
+ int level , apr_status_t status ,
297
+ const conn_rec * c , const char * fmt , ...)
298
+ // __attribute__((format(printf,7,8)))
299
+ #endif
300
+ {
301
+ va_list args ;
302
+ char errstr [MAX_STRING_LEN ];
303
+
304
+ va_start (args , fmt );
305
+
306
+ apr_vsnprintf (errstr , MAX_STRING_LEN , fmt , args );
307
+
308
+ va_end (args );
309
+
310
+ if (modsecLogHook != NULL )
311
+ modsecLogHook (modsecLogObj , level , errstr );
312
+ }
313
+
314
+
288
315
#if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER < 3
289
316
AP_DECLARE (void ) ap_log_rerror (const char * file , int line , int level ,
290
317
apr_status_t status , const request_rec * r ,
0 commit comments