Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81456 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36429 invoked from network); 30 Jan 2015 22:41:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jan 2015 22:41:54 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.44 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.192.44 mail-qg0-f44.google.com Received: from [209.85.192.44] ([209.85.192.44:61720] helo=mail-qg0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B7/A5-34022-0B80CC45 for ; Fri, 30 Jan 2015 17:41:53 -0500 Received: by mail-qg0-f44.google.com with SMTP id l89so40449836qgf.3 for ; Fri, 30 Jan 2015 14:41:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=SnjDKZvq90L5l/xfjtPsZXwbGSILDYXE0TfSNNaVpOI=; b=LUpuNyX9PjMO8n+j/7fDODtHHjY2d+c8SV+IRj3SPpWzzvXCmarLD89oTh1XfPKugI 6hBmDEjms61CKJarMWg/z8wGZUXN6oI3hKBasSBTPhWhsrpjuWIVWMkMnQtXLLbihE06 IUNTG167ozSYw/aDE5w1sE76d7P6pBKZ9rb7wzRJey/MxBBSoOt3NRpEHkl6OfXTMIzZ gTPKHztxYfm64J0Ywo6JnBii3V0splZGkTCl5B+Jhtga5YTVJWUj1id8kbq09WLX6I2+ kqeufNqR9RhWTcKpatcJ/GaJaiHB+73ykIf/RBYRB/r2cv//dtHdRF2RStozKml6KhFZ YVZA== X-Received: by 10.140.20.226 with SMTP id 89mr16612720qgj.43.1422657709884; Fri, 30 Jan 2015 14:41:49 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.93.70 with HTTP; Fri, 30 Jan 2015 14:41:08 -0800 (PST) In-Reply-To: References: <20150121043939.5129B26183A@dd15934.kasserver.com> Date: Sat, 31 Jan 2015 07:41:08 +0900 X-Google-Sender-Auth: CRiUc_QEK-asX6VOfmkMz2tbJ7c Message-ID: To: Dan Ackroyd Cc: Thomas Bley , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11c1257e6f4e2c050de64f05 Subject: Re: [PHP-DEV] Enable error_handler callback parameters to be passed by reference From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11c1257e6f4e2c050de64f05 Content-Type: text/plain; charset=UTF-8 Hi Dan, On Fri, Jan 30, 2015 at 6:38 PM, Dan Ackroyd wrote: > On 21 January 2015 at 04:39, Thomas Bley wrote: > > In userland it is sometimes necessary to extend PHP's notices/warnings > with additional information (e.g. username from session, stack trace, etc.) > > Why can't you just use in the error handler function to write the > exact message you want? > > http://php.net/manual/en/function.error-log.php All logs may be written into different log, of course. However, not all apps write "proper"/"required" logs for _admins_. Here comes customized save handler. Besides poorly written apps, apps log should use completely separated log system IMO. i.e. Apps should not raise any errors under normal operations and leave user error/exception handler to users(admins). The reason is to detect fatal code/security/subsystem failure as soon as possible and to take action for it. i.e. Since errors should not happen with normal circumstances, all uncatched error/exception is fatal that requires immediate action. It's not mandatory, but it's best practice IMHO. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11c1257e6f4e2c050de64f05--