From: Jérôme Loyet Date: Mon, 20 Jun 2011 00:03:39 +0000 (+0000) Subject: Removed pid in debug logs written by chrildren processes X-Git-Tag: php-5.3.7RC2~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=955b801feaab1d471242c2c8fcf6918200200603;p=php Removed pid in debug logs written by chrildren processes --- diff --git a/NEWS b/NEWS index e43ad83b8c..6d8f494a06 100644 --- a/NEWS +++ b/NEWS @@ -173,10 +173,11 @@ PHP NEWS - PHP-FPM SAPI: . Added xml format to the status page. (fat) - . Remove timestamp in logs written by children processes. (fat) + . Removed timestamp in logs written by children processes. (fat) . Fixed exit at FPM startup on fpm_resources_prepare() errors. (fat) . Added master rlimit_files and rlimit_core in the global configuration settings. (fat) + . Removed pid in debug logs written by chrildren processes. (fat) - Reflection extension: . Fixed bug #54347 (reflection_extension does not lowercase module function diff --git a/sapi/fpm/fpm/zlog.c b/sapi/fpm/fpm/zlog.c index fe62fd5ce6..e45f5c5379 100644 --- a/sapi/fpm/fpm/zlog.c +++ b/sapi/fpm/fpm/zlog.c @@ -93,7 +93,11 @@ void zlog_ex(const char *function, int line, int flags, const char *fmt, ...) /* len = zlog_print_time(&tv, buf, buf_size); } if (zlog_level == ZLOG_DEBUG) { - len += snprintf(buf + len, buf_size - len, "%s: pid %d, %s(), line %d: ", level_names[flags & ZLOG_LEVEL_MASK], getpid(), function, line); + if (!fpm_globals.is_child) { + len += snprintf(buf + len, buf_size - len, "%s: pid %d, %s(), line %d: ", level_names[flags & ZLOG_LEVEL_MASK], getpid(), function, line); + } else { + len += snprintf(buf + len, buf_size - len, "%s: %s(), line %d: ", level_names[flags & ZLOG_LEVEL_MASK], function, line); + } } else { len += snprintf(buf + len, buf_size - len, "%s: ", level_names[flags & ZLOG_LEVEL_MASK]); }