You are here

function mongodb_watchdog_event_load in MongoDB 6

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

Load a MongoDB watchdog event.

Parameters

string $id: An event id.

Return value

array|FALSE The event instance in array form, of FALSE if it could not be 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;
}