We'll create fresh WordPress site with Custom Logging Service installed. You have 20 minutes to test the plugin after that site we'll be deleted.
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.
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
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 $category
At most 190 (unicode) charactersstring $description
can contain HTML same as comments (filtered byreturns false
if the category is already registered or it is too long.
clgs_clear ( $category )
deletes all log entries of $category
.
string $description
existing categoryreturns number of deleted entries or false
if action failed.
clgs_unregister( $category );
deletes all log entries and then removes $category
.
string $description
existing categoryreturns 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 $description
a registered category namestring $text
the logged message, can contain HTML same as comments (filteredwp_kses_data
)int $severity
one of defined severity levels (see above); if missing defaults toint | string | WP_User $user
user id, slug or WP user object are aceptable; if missingint $blog_id
blog id; if missing defaults to current blogint | double | string $date
a UNIX timestamp or a string recognized by strtotime()
;returns false
if entering the log failed.