]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
as Andre' pointed out, we don't need %{pid/tid}P since the user
authorJeff Trawick <trawick@apache.org>
Sat, 19 Apr 2003 03:06:30 +0000 (03:06 +0000)
committerJeff Trawick <trawick@apache.org>
Sat, 19 Apr 2003 03:06:30 +0000 (03:06 +0000)
can do %P/%{tid}P or %{pid}P/%{tid}P

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99449 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_log_config.html.en
docs/manual/mod/mod_log_config.xml
modules/loggers/mod_log_config.c

index c8685fc95f72f229721e5a9643a7e23b7935cba1..b54b549884f9e48d2860ec8ff93cbc47192a24e0 100644 (file)
 <tr class="odd"><td><code>%...P</code></td>
         <td>The process ID of the child that serviced the request.</td></tr>
 <tr><td><code>%...{<var>format</var>}P</code></td>
-        <td>The process ID and or thread id of the child that serviced the 
-        request.  Valid formats are <code>pid</code>, <code>tid</code>,
-        and <code>pid/tid</code>.</td></tr>
+        <td>The process ID or thread id of the child that serviced the 
+        request.  Valid formats are <code>pid</code> and <code>tid</code>.
+        </td></tr>
 <tr class="odd"><td><code>%...q</code></td>
         <td>The query string (prepended with a <code>?</code> if a query
         string exists, otherwise an empty string)</td></tr>
index 49ff38dbb3eeb99f2c3e11776736a6aede7caa2b..fa0ada96abbf77da2d2109a0effe815e21c0ad13 100644 (file)
         <td>The process ID of the child that serviced the request.</td></tr>
 
     <tr><td><code>%...{<var>format</var>}P</code></td>
-        <td>The process ID and or thread id of the child that serviced the 
-        request.  Valid formats are <code>pid</code>, <code>tid</code>,
-        and <code>pid/tid</code>.</td></tr>
+        <td>The process ID or thread id of the child that serviced the 
+        request.  Valid formats are <code>pid</code> and <code>tid</code>.
+        </td></tr>
 
     <tr><td><code>%...q</code></td>
         <td>The query string (prepended with a <code>?</code> if a query
index 85aae5a09efeb9a1186bf9e89caa92e8efdc6313..ada30a53d4698ee99daabb1bbfd71c008bb4386b 100644 (file)
@@ -616,25 +616,18 @@ static const char *log_server_name(request_rec *r, char *a)
 static const char *log_pid_tid(request_rec *r, char *a)
 {
     if (*a == '\0' || !strcmp(a, "pid")) {
-        return apr_psprintf(r->pool, "%ld", (long)getpid());
+        return apr_psprintf(r->pool, "%" APR_PID_T_FMT, getpid());
     }
-    else {
+    else if (!strcmp(a, "tid")) {
 #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
-
-        if (!strcmp(a, "pid/tid")) {
-            return apr_psprintf(r->pool, "%ld/%pT", (long)getpid(), &tid);
-        }
-        else if (!strcmp(a, "tid")) {
-            return apr_psprintf(r->pool, "%pT", &tid);
-        }
-        else { /* bogus string */
-            return a;
-        }
+        return apr_psprintf(r->pool, "%pT", &tid);
     }
+    /* bogus format */
+    return a;
 }
 
 static const char *log_connection_status(request_rec *r, char *a)