PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB_DataObject » Bug #971

debug improvement

Details

Submitted2004-03-08 13:28 UTC
Frommaka3d at yahoo dot com dot br
StatusNo Feedback
PackageDB_DataObject
PHP Version4.3.4
OSwinXP/freeBSD
Roadmaps(Not assigned)

Comments

[2004-03-08 13:28 UTC] maka3d at yahoo dot com dot br

Description:
------------
I would like to suggest 2 improvement to debug.

1 ) The first is the ability to use custom debugger like this

class mydebuger {
function debug($type,$string,$level) {
.... if $type is query ....
here I can implement my own filters!!! very nice!!
}
}
DB_DataObject::debugLevel(new mydebugger);

2 ) Be possible to set diferent debugLevels to each object.

Doing this sets globally:
DB_DataObject::debugLevel(new mydebugger);

and this sets only to the instance

$users->debugLevel(new mydebugger);

but for this you will have to change all checks to debug that is done like this:

if(@$_DB_DATAOBJECT['CONFIG']['debug']) ...

to a not static check like this:
if($this->_debug) or this if($this->_debug()) to be able to check at static functions.