Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 10054 invoked from network); 7 Jun 2010 12:23:50 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Jun 2010 12:23:50 -0000 Received: (qmail 78857 invoked by uid 500); 7 Jun 2010 12:23:50 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 78750 invoked by uid 500); 7 Jun 2010 12:23:49 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 78743 invoked by uid 99); 7 Jun 2010 12:23:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jun 2010 12:23:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jun 2010 12:23:47 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 630E023889B3; Mon, 7 Jun 2010 12:23:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r952201 - /httpd/httpd/trunk/server/log.c Date: Mon, 07 Jun 2010 12:23:26 -0000 To: cvs@httpd.apache.org From: rjung@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100607122326.630E023889B3@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rjung Date: Mon Jun 7 12:23:26 2010 New Revision: 952201 URL: http://svn.apache.org/viewvc?rev=952201&view=rev Log: Add process id and thread id (if APR has thread support) to the error log. Modified: httpd/httpd/trunk/server/log.c Modified: httpd/httpd/trunk/server/log.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/log.c?rev=952201&r1=952200&r2=952201&view=diff ============================================================================== --- httpd/httpd/trunk/server/log.c (original) +++ httpd/httpd/trunk/server/log.c Mon Jun 7 12:23:26 2010 @@ -28,6 +28,7 @@ #include "apr_thread_proc.h" #include "apr_lib.h" #include "apr_signal.h" +#include "apr_portable.h" #define APR_WANT_STDIO #define APR_WANT_STRFUNC @@ -620,6 +621,18 @@ static void log_error_core(const char *f if ((level & APLOG_STARTUP) != APLOG_STARTUP) { len += apr_snprintf(errstr + len, MAX_STRING_LEN - len, "[%s] ", priorities[level_and_mask].t_name); + + len += apr_snprintf(errstr + len, MAX_STRING_LEN - len, + "[%" APR_PID_T_FMT, getpid()); +#if APR_HAS_THREADS + { + apr_os_thread_t tid = apr_os_thread_current(); + len += apr_snprintf(errstr + len, MAX_STRING_LEN - len, + ":%pT", &tid); + } +#endif + errstr[len++] = ']'; + errstr[len++] = ' '; } if (file && level_and_mask >= APLOG_DEBUG) {