samples/PhotoAlbum/lib/rb.php
public function setDebugMode( $tf, $logger = NULL ) {
		$this->connect();
		$this->debug = (bool)$tf;
		if ($this->debug and !$logger) $logger = new RedBean_Logger_Default();
		$this->setLogger($logger);
	}
public function setDebugMode( $tf, $logger = NULL ) {
		$this->connect();
		$this->debug = (bool)$tf;
		if ($this->debug and !$logger) $logger = new RedBean_Logger_Default();
		$this->setLogger($logger);
	}
public function setDebugMode ( $ tf , $ logger = NULL ) { $ this -> connect ( ) ; $ this -> debug = ( bool ) $ tf ; if ( $ this -> debug and ! $ logger ) $ logger = new RedBean_Logger_Default ( ) ; $ this -> setLogger ( $ logger ) ; }
Toggles debug mode. In debug mode the driver will print all
SQL to the screen together with some information about the
results. All SQL code that passes through the driver will be
passes on to the screen for inspection.
This method has no return value.

Additionally you can inject RedBean_Logger implementation
where you can define your own log() method

@param boolean $trueFalse turn on/off
@param RedBean_Logger $logger

@return void
Toggles debug mode . In debug mode the driver will print all SQL to the screen together with some information about the results . All SQL code that passes through the driver will be passes on to the screen for inspection . This method has no return value .