public function Logger::eventCount in MongoDB 8.2
Return the number of events for a template.
Parameters
\Drupal\mongodb_watchdog\EventTemplate $template: A template for which to count events.
Return value
int The number of matching events.
File
- modules/
mongodb_watchdog/ src/ Logger.php, line 628
Class
- Logger
- Class Logger is a PSR/3 Logger using a MongoDB data store.
Namespace
Drupal\mongodb_watchdogCode
public function eventCount(EventTemplate $template) : int {
return $this
->eventCollection($template->_id)
->countDocuments();
}