Overview

Past is an extended logging framework, designed to log and later analyze complex data structures to a pluggable backend.

It can record watchdog events (and be a watchdog module replacement). Also it can capture uncaught exceptions with backtraces and circumvent PHP limitations in error handling with a shutdown handler to capture all possible application errors. It can even scan PHP error.log files for missing pieces.

Another typical use case for past is logging communication between one or multiple services, where data is received, processed and forwarded.

A single log message is called an event, which can have multiple attached arguments, each argument can be a scalar, an array, an object or an exception. Complex data structures like arrays and objects are stored separately so that they can be searched and displayed in a readable way, those rows are called "(event) data".

Features

  • Procedural and object oriented interface for logging events
  • Attach any number of arguments to a single event
  • Pluggable backend. The current default backend is a database/entity based backend, a simpletest backend is additionally provided that allows to display events as debug output
  • Each element in an array or object is stored separately to be search and filterable
  • Views and drush integration for the database backend
  • Expiration of old entries
  • Log PHP errors and exceptions with backtraces
  • Workaround to capture special PHP errors through shutdown handler
  • Bug hunt UI with TODO / done flags
  • Scan PHP error.log for fatal errors

Requirements

Past was built for D7. There will be no back port.

The default backend requires the Entity module.

Documentation

See the README.txt and the API documentation.

Introductional blog post about Past

Known problems

There is currently no views integration to search and filter the event data.

Recommended modules

Views to be able to list and filter events in the reports section of your site.

Similar projects

The watchdog API provided by Drupal core provides a simpler API with less functionality for complex data and is targeted more towards end-users with e.g. translated log messages.

Supporting organizations: 
Initiation, Architecture, Implementation, Maintenance

Project information

Releases