getLogger() public static method

Returns the current logger instance being used by the database object.
public static getLogger ( ) : RedBeanPHP\Logger
return RedBeanPHP\Logger
Example #1
0
 /**
  * Test basic logging functionality.
  *
  * @return void
  */
 public function testBasicLogging()
 {
     R::nuke();
     R::startLogging();
     R::store(R::dispense('book'));
     $logs = R::getLogs();
     $count = count($logs);
     asrt(count($logs) > 0, TRUE);
     asrt(R::getLogger() instanceof Logger, TRUE);
     R::stopLogging();
     R::store(R::dispense('book'));
     $logs = R::getLogs();
     asrt(count($logs) === 0, TRUE);
 }