mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-05 22:09:25 +03:00
Introduced ap_log_rerror declaration to standalone/server.c
This commit is contained in:
committed by
Felipe Zimmerle
parent
76dfc1a90b
commit
8f3bc3cbac
@@ -285,6 +285,31 @@ AP_DECLARE(void) ap_log_error_(const char *file, int line, int module_index,
|
|||||||
modsecLogHook(modsecLogObj, level, errstr);
|
modsecLogHook(modsecLogObj, level, errstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER < 3
|
||||||
|
AP_DECLARE(void) ap_log_rerror(const char *file, int line, int level,
|
||||||
|
apr_status_t status, const request_rec *r,
|
||||||
|
const char *fmt, ...)
|
||||||
|
// __attribute__((format(printf,6,7)))
|
||||||
|
#else
|
||||||
|
AP_DECLARE(void) ap_log_rerror_(const char *file, int line, int module_index,
|
||||||
|
int level, apr_status_t status,
|
||||||
|
const request_rec *r, const char *fmt, ...)
|
||||||
|
// __attribute__((format(printf,7,8)))
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
char errstr[MAX_STRING_LEN];
|
||||||
|
|
||||||
|
va_start(args, fmt);
|
||||||
|
|
||||||
|
apr_vsnprintf(errstr, MAX_STRING_LEN, fmt, args);
|
||||||
|
|
||||||
|
va_end(args);
|
||||||
|
|
||||||
|
if(modsecLogHook != NULL)
|
||||||
|
modsecLogHook(modsecLogObj, level, errstr);
|
||||||
|
}
|
||||||
|
|
||||||
#if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER < 3
|
#if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER < 3
|
||||||
AP_DECLARE(void) ap_log_perror(const char *file, int line, int level,
|
AP_DECLARE(void) ap_log_perror(const char *file, int line, int level,
|
||||||
apr_status_t status, apr_pool_t *p,
|
apr_status_t status, apr_pool_t *p,
|
||||||
|
Reference in New Issue
Block a user