You are here

public function Logger::eventCollection in MongoDB 8

Parameters

$template_id:

Return value

\MongoCollection

File

src/Logger/Logger.php, line 70
Logger functionality (watchdog).

Class

Logger
MongoDB logger implementation for watchdog().

Namespace

Drupal\mongodb\Logger

Code

public function eventCollection($template_id) {
  $collection_name = static::EVENT_COLLECTION_PREFIX . $template_id;
  assert('preg_match(static::EVENT_COLLECTIONS_PATTERN, $collection_name)');
  return $this->collection_factory
    ->get($collection_name);
}