->debug() – output debug information.


void $DB_DataObject->debug ( string $message , string $logPrefix , integer $level=1 )


Debugger - you can use this in your extended classes to output debugging information. Uses DB_DataObject::DebugLevel(x) to turn it on, and can be completly turned off by using the production setting in the configuration file


  • string $message - message to output

  • string $logPrefix - A bold prefix string

  • integer $level - output level, 1 is general, 5 tends to reveal things like database connection passwords..


This function can not be called statically.

In production mode, the debugger is disabled


Setting the debugging level

= new DataObjects_Person;

// always prints
$person->debug('just got the person, about to set stuff''my application',0); 

// only prints if debuglevel is set
$person->debug('just set the variables, about to update''my application',1);
set the amount of debugging output (Previous) throw an error (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

Note by: pierre2543@hotmail.com
To send debug messages to a function you define instead of being printed.

In your configuration set debug to something callable. For example: debug='myDOdebugFunction'

And define the function:
function myDOdebugFunction($class, $message, $logtype, $level){