From b5e5abb38ab10686d11978e847cf3675bdac56d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Loyet?= Date: Mon, 20 Jun 2011 00:03:39 +0000 Subject: [PATCH] Removed pid in debug logs written by chrildren processes --- sapi/fpm/fpm/zlog.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sapi/fpm/fpm/zlog.c b/sapi/fpm/fpm/zlog.c index fe62fd5ce66..e45f5c53795 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]); }