WordPress plugin intelligence profile

LogStore

LogStore is a 'meta' plugin that allows other plugins to log data easily.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 3.1
Current version0.1.2
WordPress coverageTested up to WordPress 3.1
Minimum stackWP 3.1 · PHP —
Directory statusactive
Last directory update28 Feb 201115y ago
Active installationsNewAdoption metric — not a quality score
WordPress.org ratingNo WordPress.org ratings yet
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records LogStore version 0.1.2 as active, updated 15y ago and tested up to WordPress 3.1.

Overview

About this plugin

LogStore can be used to log (important) data from within your plugin.

It provides a simple interface to log entries and a friendly administration interface for viewing and managing the log entries.

While LogStore can be used to log debug output or system events, it’s main intention is to log more extensive data, such as:

  • system emails sent your users
  • data received from remote API calls

Usage

To use LogStore in your plugin, add the following line to your plugin’s ‘plugins_loaded’ callback function:

if (class_exists('LogStore')) $this->log = new LogStore('slug', __('Title'));

  • The ‘slug’ should be a unique identifier for your logger.
  • The ‘Title’ will be the title used in menu entries, options and page titles.

Once that’s done you can then start logging your data from anywhere within your plugin by using the following:

empty($this->log)) $this->log->log(__('My log message'), $my_log_data, 'status', 'tag');

  • ‘My log message.’ is any arbitrary message to describe your log entry.
  • $my_log_data is the extended data you want to log. This can be either an array or string.
  • ‘status’ is one of ‘none’, ‘ok’, ‘warn’, ‘critical’ or ‘fatal’.
  • ‘tag’ can be any kind of singular tag to further classification to your log entries.add

If you use LogStore in your plugin, you should check for it’s presence in

  • your ‘plugins_loaded’ callback
  • your plugin activation callback

You should either make LogStore use optional or notify the user that they need to install LogStore for your plugin to work properly.

Plugin Hooks

In the following hooks, *myname* stands for the name with which you instanciated the LogStore class.

Action Hooks

  • logstore_init-*myname* – runs during the execution of WP’s init action hook, passes a single boolean parameter indicating if logging is active or inactive for this logger

Filter Hooks

  • logstore_new_entry-*myname* – runs during the creation of a new entry, passes a single array containing all values for that entry (‘time’, ‘message’, ‘data’, ‘status’ and ‘tag’)
  • logstore_entry-*myname* – runs before displaying an entry on screen, passes a single array containting all values for the entry (‘time’, ‘message’, ‘data’, ‘status’ and ‘tag’)
  • logstore_format_entry_data-*myname* – runs before displaying the formatted data on screen, passes the formatted data as string

Further Notes

Please note that the ‘bulk actions’ in the log viewer are currently not

working.

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • development
  • log
  • logging
  • meta
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 3.1

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 3.1.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to3.1
Minimum requirementsWordPress 3.1 · PHP not listed
Update activity28 Feb 201115y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.