Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46407 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18479 invoked from network); 13 Dec 2009 17:20:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Dec 2009 17:20:13 -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:36609] helo=mail-iw0-f195.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FE/91-09748-D42252B4 for ; Sun, 13 Dec 2009 12:20:13 -0500 Received: by iwn33 with SMTP id 33so1503683iwn.29 for ; Sun, 13 Dec 2009 09:20:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.146.2 with SMTP id f2mr1262713ibv.23.1260724810312; Sun, 13 Dec 2009 09:20:10 -0800 (PST) In-Reply-To: <3bea96c40912130839s5a2af715x1dffa62d3c6187ba@mail.gmail.com> References: <3bea96c40912130839s5a2af715x1dffa62d3c6187ba@mail.gmail.com> Date: Sun, 13 Dec 2009 18:20:10 +0100 Message-ID: <3bea96c40912130920k2a6f3634qc8a39a795d575158@mail.gmail.com> To: php-dev Cc: Antony Dovgal Content-Type: multipart/mixed; boundary=0016e64c06167a6d0f047a9f5e31 Subject: Re: [PATCH] fpm/feature: show function and line in error_log only on debug From: jerome@loyet.net (=?ISO-8859-1?B?Suly9G1lIExveWV0?=) --0016e64c06167a6d0f047a9f5e31 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Le 13 d=E9cembre 2009 17:39, J=E9r=F4me Loyet a =E9crit = : > 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 With the correct version of the patch (.txt extension). > > Hope it helps > ++ Jerome > --0016e64c06167a6d0f047a9f5e31 Content-Type: text/plain; charset=windows-1250; name="php-fpm.zlog_debug.patch.txt" Content-Disposition: attachment; filename="php-fpm.zlog_debug.patch.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g362z7h01 SW5kZXg6IHNhcGkvZnBtL2ZwbS96bG9nLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc2FwaS9mcG0vZnBtL3ps b2cuYwkocul2aXNpb24gMjkyMDY3KQorKysgc2FwaS9mcG0vZnBtL3psb2cuYwkoY29waWUgZGUg dHJhdmFpbCkKQEAgLTczLDcgKzczLDExIEBACiAJc2F2ZWRfZXJybm8gPSBlcnJubzsKIAlnZXR0 aW1lb2ZkYXkoJnR2LCAwKTsKIAlsZW4gPSB6bG9nX3ByaW50X3RpbWUoJnR2LCBidWYsIGJ1Zl9z aXplKTsKLQlsZW4gKz0gc25wcmludGYoYnVmICsgbGVuLCBidWZfc2l6ZSAtIGxlbiwgIiBbJXNd ICVzKCksIGxpbmUgJWQ6ICIsIGxldmVsX25hbWVzW2ZsYWdzICYgWkxPR19MRVZFTF9NQVNLXSwg ZnVuY3Rpb24sIGxpbmUpOworCWlmICh6bG9nX2xldmVsID09IFpMT0dfREVCVUcpIHsKKwkJbGVu ICs9IHNucHJpbnRmKGJ1ZiArIGxlbiwgYnVmX3NpemUgLSBsZW4sICIgWyVzXSBwaWQgJWQsICVz KCksIGxpbmUgJWQ6ICIsIGxldmVsX25hbWVzW2ZsYWdzICYgWkxPR19MRVZFTF9NQVNLXSwgZ2V0 cGlkKCksIGZ1bmN0aW9uLCBsaW5lKTsKKwl9IGVsc2UgeworCQlsZW4gKz0gc25wcmludGYoYnVm ICsgbGVuLCBidWZfc2l6ZSAtIGxlbiwgIiBbJXNdICIsIGxldmVsX25hbWVzW2ZsYWdzICYgWkxP R19MRVZFTF9NQVNLXSk7CisJfQogCiAJaWYgKGxlbiA+IGJ1Zl9zaXplIC0gMSkgewogCQl0cnVu Y2F0ZWQgPSAxOwo= --0016e64c06167a6d0f047a9f5e31--