Doctrine\MongoDB\Connection::log PHP Method

log() public method

Log something using the configured logger callable (if available).
public log ( array $log )
$log array
    public function log(array $log)
    {
        if (null !== $this->config->getLoggerCallable()) {
            call_user_func($this->config->getLoggerCallable(), $log);
        }
    }

Usage Example

Beispiel #1
0
 public function testLog()
 {
     $conn = new Connection();
     $called = false;
     $conn->getConfiguration()->setLoggerCallable(function ($msg) use(&$called) {
         $called = $msg;
     });
     $conn->log(array('test'));
     $this->assertEquals(array('test'), $called);
 }
All Usage Examples Of Doctrine\MongoDB\Connection::log