fat                                      Mon, 20 Jun 2011 00:03:39 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=312319

Log:
Removed pid in debug logs written by chrildren processes

Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/sapi/fpm/fpm/zlog.c
    U   php/php-src/branches/PHP_5_4/sapi/fpm/fpm/zlog.c
    U   php/php-src/trunk/sapi/fpm/fpm/zlog.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS   2011-06-19 23:25:45 UTC (rev 312318)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-06-20 00:03:39 UTC (rev 312319)
@@ -173,10 +173,11 @@

 - 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

Modified: php/php-src/branches/PHP_5_3/sapi/fpm/fpm/zlog.c
===================================================================
--- php/php-src/branches/PHP_5_3/sapi/fpm/fpm/zlog.c    2011-06-19 23:25:45 UTC 
(rev 312318)
+++ php/php-src/branches/PHP_5_3/sapi/fpm/fpm/zlog.c    2011-06-20 00:03:39 UTC 
(rev 312319)
@@ -93,7 +93,11 @@
                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]);
        }

Modified: php/php-src/branches/PHP_5_4/sapi/fpm/fpm/zlog.c
===================================================================
--- php/php-src/branches/PHP_5_4/sapi/fpm/fpm/zlog.c    2011-06-19 23:25:45 UTC 
(rev 312318)
+++ php/php-src/branches/PHP_5_4/sapi/fpm/fpm/zlog.c    2011-06-20 00:03:39 UTC 
(rev 312319)
@@ -93,7 +93,11 @@
                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]);
        }

Modified: php/php-src/trunk/sapi/fpm/fpm/zlog.c
===================================================================
--- php/php-src/trunk/sapi/fpm/fpm/zlog.c       2011-06-19 23:25:45 UTC (rev 
312318)
+++ php/php-src/trunk/sapi/fpm/fpm/zlog.c       2011-06-20 00:03:39 UTC (rev 
312319)
@@ -93,7 +93,11 @@
                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]);
        }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to