Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46405 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13218 invoked from network); 13 Dec 2009 16:39:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Dec 2009 16:39:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=jerome@loyet.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=jerome@loyet.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain loyet.net from 209.85.223.195 cause and error) X-PHP-List-Original-Sender: jerome@loyet.net X-Host-Fingerprint: 209.85.223.195 mail-iw0-f195.google.com Received: from [209.85.223.195] ([209.85.223.195:45262] helo=mail-iw0-f195.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 03/B0-09748-1B8152B4 for ; Sun, 13 Dec 2009 11:39:15 -0500 Received: by iwn33 with SMTP id 33so1490667iwn.29 for ; Sun, 13 Dec 2009 08:39:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.156.85 with SMTP id v21mr1820952ibw.38.1260722350589; Sun, 13 Dec 2009 08:39:10 -0800 (PST) Date: Sun, 13 Dec 2009 17:39:10 +0100 Message-ID: <3bea96c40912130839s5a2af715x1dffa62d3c6187ba@mail.gmail.com> To: php-dev Cc: Antony Dovgal Content-Type: multipart/mixed; boundary=0050450169e3de0ead047a9ecbfc Subject: [PATCH] fpm/feature: show function and line in error_log only on debug From: jerome@loyet.net (=?ISO-8859-1?B?Suly9G1lIExveWV0?=) --0050450169e3de0ead047a9ecbfc Content-Type: text/plain; charset=ISO-8859-1 Hi tony, in the FPM error_log, the function and the line, from which the log function is called, are written to the error_log as show above: Dec 13 17:30:18.81042 [NOTICE] fpm_event_init_main(), line 87: libevent: using epoll It's debug information and it's not relevant but for developers. The attached patch change this behaviour showing function and line only when the log_level is set to debug. Moreover, it adds the PID of the process which call the log function but only in with a debug loglevel. Without debug: Dec 13 17:32:59.383706 [NOTICE] libevent: using epoll With debug: Dec 13 17:33:38.817841 [NOTICE] pid 7932, fpm_event_init_main(), line 87: libevent: using epoll Hope it helps ++ Jerome --0050450169e3de0ead047a9ecbfc--