From: Jeff Trawick Date: Sat, 19 Apr 2003 03:06:30 +0000 (+0000) Subject: as Andre' pointed out, we don't need %{pid/tid}P since the user X-Git-Tag: pre_ajp_proxy~1822 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ab74e345f03cb3f310e54c60e5bbd893be8faa56;p=thirdparty%2Fapache%2Fhttpd.git as Andre' pointed out, we don't need %{pid/tid}P since the user 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 --- diff --git a/docs/manual/mod/mod_log_config.html.en b/docs/manual/mod/mod_log_config.html.en index c8685fc95f7..b54b549884f 100644 --- a/docs/manual/mod/mod_log_config.html.en +++ b/docs/manual/mod/mod_log_config.html.en @@ -117,9 +117,9 @@ %...P The process ID of the child that serviced the request. %...{format}P - The process ID and or thread id of the child that serviced the - request. Valid formats are pid, tid, - and pid/tid. + The process ID or thread id of the child that serviced the + request. Valid formats are pid and tid. + %...q The query string (prepended with a ? if a query string exists, otherwise an empty string) diff --git a/docs/manual/mod/mod_log_config.xml b/docs/manual/mod/mod_log_config.xml index 49ff38dbb3e..fa0ada96abb 100644 --- a/docs/manual/mod/mod_log_config.xml +++ b/docs/manual/mod/mod_log_config.xml @@ -111,9 +111,9 @@ The process ID of the child that serviced the request. %...{format}P - The process ID and or thread id of the child that serviced the - request. Valid formats are pid, tid, - and pid/tid. + The process ID or thread id of the child that serviced the + request. Valid formats are pid and tid. + %...q The query string (prepended with a ? if a query diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c index 85aae5a09ef..ada30a53d46 100644 --- a/modules/loggers/mod_log_config.c +++ b/modules/loggers/mod_log_config.c @@ -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)