- ⌂ log
- Methods
log::__construct()
Create a new event log.
Prototype
__construct(log $chain_log = NULL, type $level = type::INFO)
Parameters
- chain_log - Optional event log to chain this event log to. If specified, the chain_log will also receive events logged to this event log.
- level - Optional event type to indicate the log level. If specified, all events of the specified severity or more critical (lower number) will be logged. All events of less severity (higher number) will not be logged.
Return
A log object is returned, which can be used to log and report events.
Examples
Simple Log
require_once('path/to/comand.php');
$log = new \io_comand_log\log();
$log->log_notice("This is a notice.");
Chain Log
All events of type NOTICE or more severe will be logged to $log as well as $repo->SystemLog.
use \io_comand_log\event\type;
require_once('path/to/comand.php');
$repo = comand::repo();
$log = new \io_comand_log\log($repo->SystemLog, type::NOTICE);
$log->log_notice("This is a notice.");