WordPress.org

Ready to get started?Download WordPress

Plugin Directory

WordPress Logging Service

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

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);

Requires: 3.5 or higher
Compatible up to: 3.6.1
Last Updated: 2013-10-7
Downloads: 3,353

Ratings

4 stars
4.8 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,1,1 0,1,0
0,2,0
100,1,1
100,1,1