mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-17 00:46:08 +03:00
Adds ap_log_cerror_ to the standalone implementation
This commit is contained in:
parent
7bdb79a1a2
commit
b6293988fe
@ -285,6 +285,33 @@ 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_cerror(const char *file, int line, int level,
|
||||||
|
apr_status_t status, const conn_rec *r,
|
||||||
|
const char *fmt, ...)
|
||||||
|
// __attribute__((format(printf,6,7)))
|
||||||
|
#else
|
||||||
|
AP_DECLARE(void) ap_log_cerror_(const char *file, int line, int module_index,
|
||||||
|
int level, apr_status_t status,
|
||||||
|
const conn_rec *c, 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_rerror(const char *file, int line, int level,
|
AP_DECLARE(void) ap_log_rerror(const char *file, int line, int level,
|
||||||
apr_status_t status, const request_rec *r,
|
apr_status_t status, const request_rec *r,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user