Project VersionsSearchTable Of ContentsPrevious topicClass Phalcon\Logger\Adapter\Stream Next topicClass Phalcon\Logger\Exception This Page |
Class Phalcon\Logger\Adapter\Syslog¶extends Phalcon\Logger\Adapter implements Phalcon\Logger\AdapterInterface Sends logs to the system logger <?php
$logger = new \Phalcon\Logger\Adapter\Syslog("ident", array(
'option' => LOG_NDELAY,
'facility' => LOG_MAIL
));
$logger->log("This is a message");
$logger->log("This is an error", \Phalcon\Logger::ERROR);
$logger->error("This is another error");
Methods¶public __construct (string $name, [array $options]) Phalcon\Logger\Adapter\Syslog constructor public Phalcon\Logger\Formatter\Line getFormatter () Returns the internal formatter public logInternal (string $message, int $type, int $time) Writes the log to the stream itself public boolean close () Closes the logger public setLogLevel (int $level) inherited from Phalcon\Logger\Adapter Filters the logs sent to the handlers to be less or equals than a specific level public getLogLevel () inherited from Phalcon\Logger\Adapter Returns the current log level public setFormatter (Phalcon\Logger\FormatterInterface $formatter) inherited from Phalcon\Logger\Adapter Sets the message formatter public begin () inherited from Phalcon\Logger\Adapter Starts a transaction public commit () inherited from Phalcon\Logger\Adapter Commits the internal transaction public rollback () inherited from Phalcon\Logger\Adapter Rollbacks the internal transaction public emergence (string $message) inherited from Phalcon\Logger\Adapter Sends/Writes an emergence message to the log public debug (string $message) inherited from Phalcon\Logger\Adapter Sends/Writes a debug message to the log public error (string $message) inherited from Phalcon\Logger\Adapter Sends/Writes an error message to the log public info (string $message) inherited from Phalcon\Logger\Adapter Sends/Writes an info message to the log public notice (string $message) inherited from Phalcon\Logger\Adapter Sends/Writes a notice message to the log public warning (string $message) inherited from Phalcon\Logger\Adapter Sends/Writes a warning message to the log public alert (string $message) inherited from Phalcon\Logger\Adapter Sends/Writes an alert message to the log public log (string $message, [int $type]) inherited from Phalcon\Logger\Adapter Logs messages to the internal loggger. Appends logs to the |