-*- coding: utf-8 -*-
Changes with Apache 2.1.9
+ *) mod_log_config: %{hextid}P will log the thread id in hex with APR
+ versions 1.2.0 or higher. [Jeff Trawick]
+
*) httpd.exe/apachectl -V: display the DYNAMIC_MODULE_LIMIT setting, as
in 1.3. [Jeff Trawick]
if (*a == '\0' || !strcmp(a, "pid")) {
return ap_append_pid(r->pool, "", "");
}
- else if (!strcmp(a, "tid")) {
+ else if (!strcmp(a, "tid") || !strcmp(a, "hextid")) {
#if APR_HAS_THREADS
apr_os_thread_t tid = apr_os_thread_current();
#else
int tid = 0; /* APR will format "0" anyway but an arg is needed */
#endif
- return apr_psprintf(r->pool, "%pT", &tid);
+ return apr_psprintf(r->pool,
+#if APR_MAJOR_VERSION > 1 || (APR_MAJOR_VERSION == 1 && APR_MINOR_VERSION >= 2)
+ /* APR can format a thread id in hex */
+ *a == 'h' ? "%pt" : "%pT",
+#else
+ /* APR is missing the feature, so always use decimal */
+ "%pT",
+#endif
+ &tid);
}
/* bogus format */
return a;