Req #69654 [Com]: Add E_DEBUG and E_USER_DEBUG constants
| From: | a dot cobest at gmail dot com | Date: | Tue, 19 May 2015 08:40:47 +0000 |
| Subject: | Req #69654 [Com]: Add E_DEBUG and E_USER_DEBUG constants | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-192748@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69654&edit=1
ID: 69654
Comment by: a dot cobest at gmail dot com
Reported by: a dot cobest at gmail dot com
Summary: Add E_DEBUG and E_USER_DEBUG constants
Status: Open
Type: Feature/Change Request
Package: Scripting Engine problem
Operating System: any
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Patch req69654.E_USER_DEBUG.E_DEBUG.patch for master branch
Previous Comments:
------------------------------------------------------------------------
[2015-05-19 08:39:10] a dot cobest at gmail dot com
Add E_USER_DEBUG constant
------------------------------------------------------------------------
[2015-05-18 14:39:22] a dot cobest at gmail dot com
MongoLog from MongoDB extension (not monolog package)
------------------------------------------------------------------------
[2015-05-18 14:21:40] a dot cobest at gmail dot com
May be make sense make two constants: E_DEBUG and E_USER_DEBUG
------------------------------------------------------------------------
[2015-05-18 14:19:10] a dot cobest at gmail dot com
duplicate E_DEBUG in title
------------------------------------------------------------------------
[2015-05-18 14:18:13] a dot cobest at gmail dot com
Description:
------------
All loggers and project has [DEBUG] mode. Using E_NOTICE as debug identification is incorrect for
dev-messages because in production dev-message must be ignoring and in dev-mode all messages
(notices and debugs) mixed in mess.
Some extensions can use the constant E_DEBUG in their dev-messages. For example, MongoLog use
E_NOTICE for debugging. It is not convenient.
Test script:
---------------
<?php
// ...
trigger_error("Connection with DB established", E_DEBUG);
// ...
Expected result:
----------------
If bit E_DEBUG present in error_reporting:
Debug: Connection with DB established in ...
Actual result:
--------------
The constant E_DEBUG doesn't exists
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69654&edit=1