object_log.module example

The Object Log module allows developers to store objects, arrays and other variables to a log table so that they may be inspected later. Multiple stored variables may be displayed side-by-side in the Object log under admin/reports.

The usage is similar to Devel module's dpm() or kprint_r() functions, but is particularly suited for debugging server-to-server requests, such as cron runs and web services, or for requests from anonymous and other unprivileged users.

Usage

When you reach a point in code at which you would like to store an object, call the object_log() function...

<?php
  object_log
($label, $data);
?>

...where $label is a string representing a name to give the object in the log, and $data is the variable you wish to store. If there is already a stored object with the same $label, that entry will be overwritten in the log.

Stored objects may be inspected by any user with the "access devel information" permission by going to admin/reports/object_log. While inspecting an object, a second object may be selected to display both objects side-by-side.

Requirements

The Object Log module depends on Devel module:
http://drupal.org/project/devel

Downloads

Recommended releases

Version Downloads Date Links
7.x-1.0 tar.gz (9.9 KB) | zip (11.43 KB) 2011-Nov-27 Notes

Development releases

Version Downloads Date Links
8.x-1.x-dev tar.gz (9.9 KB) | zip (11.43 KB) 2011-Dec-30 Notes
7.x-1.x-dev tar.gz (9.91 KB) | zip (11.43 KB) 2011-Dec-30 Notes

Project Information


Maintainers for Object Log

  • Les Lim - 7 commits
    last: 21 weeks ago, first: 26 weeks ago

Issues for Object Log

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports