WordPress Logging Service

Provides a simple API for storing miscellaneous log entries and their overview in admin area.

Author:Zaantar (profile at wordpress.org)
WordPress version required:3.5
WordPress version tested:3.6.1
Plugin version:1.5.4
Added to WordPress repository:20-12-2011
Last updated:07-10-2013
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:100
Rated by:3
Plugin URI:http://wordpress.org/extend/plugins/wordpress...
Total downloads:4 933
Active installs:30+
plugin download
Click to start download

This plugin provides a simple API for storing miscellaneous log entries and their overview in admin area (or network
admin area, if activated on a multisite).

Developed for private use (heavily used by my other plugins), but has perspective for more extensive usage. I can’t guarantee any support in the future nor further development, but it is to be expected. Kindly inform me about bugs, if you find any, or propose new features: zaantar@zaantar.eu.

See Usage and FAQ for more information.

API

Definitions:

WLS
  • should be checked before using any wls function

    WLS_VERSION

  • should(!) contain current WLS version string

  • severity levels:

    WLS_NOCATEGORY = 0
    
    WLS_INFO = 1
    
    WLS_NOTICE = 2
    
    WLS_WARNING = 3
    
    WLS_ERROR = 4
    
    WLS_FATALERROR = 5
    

Functions:

wls_is_registered( $category_name );
  • returns true, if $category_name is registered

    wls_register( $category_name, $description );

  • registers $category_name as a log category.

  • $description will be shown in admin area

    wls_clear( $category_name );

  • deletes all log entries of category $category_name

    wls_unregister( $category_name );

  • same as wls_clear & removes category $category_name from the list

    wls_log( $category_name, $text, $user_id, $date, $blog_id, $severity = 0 );

  • inserts a new log entry into specified category

  • $date must be formated according to ISO 8601
  • $severity should be one of defined severity levels (see above)

    wls_simple_log( $log_name, $text, $severity = 0 );

  • equivalent to wls_log( $category_name, $text, get_current_user_id(), date( 'c' ), get_current_blog_id(), $severity);


FAQ
ChangeLog