webCOMAND

io_comand_log\log Class

Used to log and report events, such as errors, warnings and notices.

Logged events can be accessed by working with a log as an array of events.

For more information, see Event Logger.

Example

$log = new \io_comand_log\log();

$log->log_notice("This will log a NOTE.");
$log->log_error("This will log an ERROR.");

// echo the log in HTML format
echo($log->as_html());

Event Iteration Example

$log = new \io_comand_log\log();

$log->log_notice("This will log a NOTE.");
$log->log_error("This will log an ERROR.");

// iterate through each event
foreach($log as $event) {
    echo($event->Message . "\n");
}