34 if (!($mongo instanceof \MongoClient || $mongo instanceof \Mongo || $mongo instanceof \MongoDB\Client)) {
35 throw new \InvalidArgumentException(
'MongoClient, Mongo or MongoDB\Client instance required');
38 $this->mongoCollection = $mongo->selectCollection($database, $collection);
45 if ($this->mongoCollection instanceof \MongoDB\Collection) {
46 $this->mongoCollection->insertOne($record[
"formatted"]);
48 $this->mongoCollection->save($record[
"formatted"]);
const DEBUG
Detailed debug information.
Base Handler class providing the Handler structure.
Logs to a MongoDB database.
Create styles array
The data for the language used.
__construct($mongo, $database, $collection, $level=Logger::DEBUG, $bubble=true)