You are here

function mongodb_watchdog_event_load in MongoDB 7

Same name and namespace in other branches
  1. 6 mongodb_watchdog/mongodb_watchdog.module \mongodb_watchdog_event_load()

Load a MongoDB watchdog event.

Parameters

string $id: The event ID.

Return value

object|false The event document, or FALSE if it was not found.

File

mongodb_watchdog/mongodb_watchdog.module, line 64

Code

function mongodb_watchdog_event_load($id) {
  $result = mongodb_collection(variable_get('mongodb_watchdog', 'watchdog'))
    ->findOne(array(
    '_id' => $id,
  ));
  return $result ? $result : FALSE;
}