tony2001                                 Mon, 14 Dec 2009 09:17:21 +0000

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

Log:
show debugging info onle when log_level is set to 'debug' (patch by Jerome 
Loyet)

Changed paths:
    U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/zlog.c

Modified: php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/zlog.c
===================================================================
--- php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/zlog.c        2009-12-14 
09:08:25 UTC (rev 292113)
+++ php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/zlog.c        2009-12-14 
09:17:21 UTC (rev 292114)
@@ -73,7 +73,11 @@
        saved_errno = errno;
        gettimeofday(&tv, 0);
        len = zlog_print_time(&tv, buf, buf_size);
-       len += snprintf(buf + len, buf_size - len, " [%s] %s(), line %d: ", 
level_names[flags & ZLOG_LEVEL_MASK], function, line);
+       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);
+       } else {
+               len += snprintf(buf + len, buf_size - len, " [%s] ", 
level_names[flags & ZLOG_LEVEL_MASK]);
+       }

        if (len > buf_size - 1) {
                truncated = 1;

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

Reply via email to