Skip to content

Commit 72c3d03

Browse files
author
fat
committed
Removed pid in debug logs written by chrildren processes
git-svn-id: http://svn.php.net/repository/php/php-src/trunk@312319 c90b9560-bf6c-de11-be94-00142212c4b1
1 parent 169e0de commit 72c3d03

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sapi/fpm/fpm/zlog.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,11 @@ void zlog_ex(const char *function, int line, int flags, const char *fmt, ...) /*
9393
len = zlog_print_time(&tv, buf, buf_size);
9494
}
9595
if (zlog_level == ZLOG_DEBUG) {
96-
len += snprintf(buf + len, buf_size - len, "%s: pid %d, %s(), line %d: ", level_names[flags & ZLOG_LEVEL_MASK], getpid(), function, line);
96+
if (!fpm_globals.is_child) {
97+
len += snprintf(buf + len, buf_size - len, "%s: pid %d, %s(), line %d: ", level_names[flags & ZLOG_LEVEL_MASK], getpid(), function, line);
98+
} else {
99+
len += snprintf(buf + len, buf_size - len, "%s: %s(), line %d: ", level_names[flags & ZLOG_LEVEL_MASK], function, line);
100+
}
97101
} else {
98102
len += snprintf(buf + len, buf_size - len, "%s: ", level_names[flags & ZLOG_LEVEL_MASK]);
99103
}

0 commit comments

Comments
 (0)