I'm trying to get the logger working in the Doctrine ODM.
// .. some initialization code here ...
$mongoConfig->setLoggerCallable(function(array $log){
print_r($log);
die("Mongo Logging Called...");
});
$dm = \Doctrine\ODM\MongoDB\DocumentManager::create(new \Doctrine\MongoDB\Connection(), $mongoConfig);
Here's the reference: http://www.doctrine-project.org/docs/mongodb_odm/1.0/en/reference/logging.html
I'm querying Documents using the query builder of the document manager.. I'm being to successfully find and persist documents. But the logger call back is NEVER called. What could I be doing wrong?