From: Jeff Trawick
The number of parameters of the ap_log_*
functions and the
definition of APLOG_MARK
has changed. Normally, the change
- is completely transparent. However, if a module implements wrapper
- functions for ap_log_*
and uses APLOG_MARK
- when calling these wrappers, some adjustments are necessary.
- The easiest way is for the module to define and use a different macro
- that expands to the parameters required by the log wrapper functions.
- APLOG_MARK
should only be used when calling
- ap_log_*
without additional wrappers. In this way, the
- code will remain compatible with HTTPD 2.0 and 2.2.
APLOG_MARK
as a parameter to its own functions
+ or if a module calls ap_log_*
without passing
+ APLOG_MARK
. A module which uses wrappers
+ around ap_log_*
typically uses both of these constructs.
+
+ The easiest way to change code which passes APLOG_MARK
to
+ its own functions is to define and use a different macro that expands to
+ the parameters required by those functions, as APLOG_MARK
+ should only be used when calling ap_log_*
+ directly. In this way, the code will remain compatible with HTTPD 2.0
+ and 2.2.
Code which calls ap_log_*
without passing
+ APLOG_MARK
will necessarily differ between 2.4 and earlier
+ releases, as 2.4 requires a new third argument,
+ APLOG_MODULE_INDEX
.
+ /* code for httpd 2.0/2.2 */
+ ap_log_perror(file, line, APLOG_ERR, 0, p, "Failed to allocate dynamic lock structure");
+
+ /* code for httpd 2.4 */
+ ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_ERR, 0, p, "Failed to allocate dynamic lock structure");
+
+
A server_rec
pointer must be passed to
ap_log_error()
when called after startup. This