You are here

function object_log in Object Log 7

Same name and namespace in other branches
  1. 8 object_log.module \object_log()

Store a variable in the object log.

Parameters

$label: A name to use for this object when storing in the log table. Using an already existing label will overwrite that object in the log.

$data: The variable to store.

2 string references to 'object_log'
object_log_build_log in ./object_log.admin.inc
Build a render array showing objects stored in the object log.
object_log_build_objects in ./object_log.admin.inc
Display stored objects for inspection.

File

./object_log.module, line 36

Code

function object_log($label, $data) {
  $fields = array(
    'data' => serialize($data),
    'created' => REQUEST_TIME,
  );
  db_merge('object_log')
    ->key(array(
    'label' => $label,
  ))
    ->fields($fields)
    ->execute();
}