- ⌂ log
- Methods
log::add_logger()
Adds a logger to this log. When this log records an event, all of its loggers are notified.
A few built-in loggers that may be useful:
- \io_comand_log\logger\echoer - log new events to STDOUT using echo().
- \io_comand_log\logger\file - log new events to a file in the local file system.
- \io_comand_log\logger\stringify - log new events to a string that can be retrieved later.
Prototype
void add_logger(logger $logger)
Parameters
- logger - The logger to add to this log instance.
Example
$log->add_logger(
new \io_comand_log\logger\file('simple', '/var/log/comand.log')
);