34 if (!($mongo instanceof \MongoClient || $mongo instanceof \Mongo)) {
35 throw new \InvalidArgumentException(
'MongoClient or Mongo instance required');
38 $this->mongoCollection = $mongo->selectCollection($database, $collection);
43 protected function write(array $record)
45 $this->mongoCollection->save($record[
"formatted"]);
Base Handler class providing the Handler structure.
Logs to a MongoDB database.
__construct($mongo, $database, $collection, $level=Logger::DEBUG, $bubble=true)
write(array $record)
Writes the record down to the log of the implementing handler.
getDefaultFormatter()
Gets the default formatter.FormatterInterface
const DEBUG
Detailed debug information.