PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

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.