Custom Logging Service Wordpress Plugin - Rating, Reviews, Demo & Download
Plugin Description
This plugin is derived from the no longer supported
WordPress Logging Service.
Despite that it is not compatiple with it, and there is no upgrade path from one
to the other.
Features
- No log entries generated by the plugin itself, all come from external API calls
- Organisation of log entries in freetext categories
- Severity levels
- Freetext log messages
- Entries can be marked as seen and then filtered from being displayed again
- Filtering by minimum severity level
- Sort by date, category, user name, severity or blog name (in Multisite installations)
- Access to the log page can be granted by user role
API
Constants
Check to test if the plugin is active:
CLGS = true
Defined severity levels:
CLGS_NOSEVERITY = 0
CLGS_INFO = 1
CLGS_NOTICE = 2
CLGS_WARNING = 3
CLGS_ERROR = 4
CLGS_FATALERROR = 5
Functions
clgs_is_registered ( $category )
string $category
returns true if $category is registered.
clgs_register ( $category, $description )
registers $category as a log category. $description will be shown in the
management page.
It is good practice to use unique categories for each plugin that publishes
log messages.
string $categoryAt most 190 (unicode) charactersstring $descriptioncan contain HTML same as comments (filtered by
wp_kses_data)
returns false if the category is already registered or it is too long.
clgs_clear ( $category )
deletes all log entries of $category.
string $descriptionexisting category
returns number of deleted entries or false if action failed.
clgs_unregister( $category );
deletes all log entries and then removes $category.
string $descriptionexisting category
returns false if false if action failed.
clgs_log( $category, $text, $severity = null, $user = null, $blog_id = null, $date = null );
writes a new log entry in the specified category
string $descriptiona registered category namestring $textthe logged message, can contain HTML same as comments (filtered
bywp_kses_data)int $severityone of defined severity levels (see above); if missing defaults to
CLGS_NOCATEGORYint | string | WP_User $useruser id, slug or WP user object are aceptable; if missing
defaults to current user (or a placeholder if none is logged in)int $blog_idblog id; if missing defaults to current blogint | double | string $datea UNIX timestamp or a string recognized bystrtotime();
if missing defaults to current time
returns false if entering the log failed.


