Zum Ende der Metadaten springen
Zum Anfang der Metadaten

loxberry_log.php is intended to provide easy logging and notification functions within LoxBerry.

Inclusion

require_once "loxberry_log.php";

 loxberry_log.php automatically loads loxberry_system.php, so it is not needed to give both libs.

 It's not required to add a path to the PHP library.

Global variables

VariableUsage
LBLog::$VERSION
Returns the library version of loxberry_log.php

 

See also 

Debugging of notifications

Functions

Most function names and features are identical to the Perl sibling Perl-Modul LoxBerry::Log with PHP adjusted syntax. Please be very attentive to LoxBerry Version hints on top of every function. Not all functions are available from within LoxBerry V1.0.0.

 

 

LBLog::get_notifications

Reads the notifications, optional filtered by $package or $package and $name. Returns an array of notifications, containing a labeled array of all attributes of a notification.

LBLog::get_notifications_html

Returns HTML that shows all notifications of the specific package, and/or name and type. The HTML includes buttons to delete the notifications.

LBLog::newLog (logging constructor PHP)

Creates a log object to do LoxBerry-specific logging to a logfile or to the standard output (stderr, stdout). The LoxBerry logging module uses the user-defined loglevel from the plugin management, therefore no plugin-own setting and own loglevel-filtering is required.

LBLog::notify

Creates an information or error notification that can be displayed in a plugin. This can be used in automated scripts like daemons or cronjobs to notify the user about good or bad news about the status of your plugin.

LBLog::notify_ext

Creates an information or error notification with extended attributes. Use this function, if you want to store more information in your notification than a simple LBLog::notify.

 

  • Keine Stichwörter