/** * Toggles DEBUG mode. * In Debug mode all SQL that happens under the hood will * be printed to the screen or logged by provided logger. * * @param boolean $tf * @param RedBean_Logger $logger */ public static function debug($tf = true, $logger = NULL) { if (!$logger) { $logger = new RedBean_Logger_Default(); } if (!isset(self::$adapter)) { throw new RedBean_Exception_Security('Use R::setup() first.'); } self::$adapter->getDatabase()->setDebugMode($tf, $logger); }
/** * Toggles DEBUG mode. * In Debug mode all SQL that happens under the hood will * be printed to the screen or logged by provided logger. * * @param boolean $tf * @param RedBean_ILogger $logger */ public static function debug($tf = true, $logger = NULL) { if (!$logger) { $logger = new RedBean_Logger(); } self::$adapter->getDatabase()->setDebugMode($tf, $logger); }
/** * Toggles DEBUG mode. * In Debug mode all SQL that happens under the hood will * be printed to the screen. * * @param boolean $tf */ public static function debug($tf = true) { self::$adapter->getDatabase()->setDebugMode($tf); }