_ident = $ident; // Open the connection to syslog openlog($this->_ident, LOG_CONS, $facility); } /** * Writes each of the messages into the syslog. * * @param array $messages * @return void */ public function write(array $messages) { foreach ($messages as $message) { syslog($message['level'], $message['body']); if (isset($message['additional']['exception'])) { syslog(Log_Writer::$strace_level, $message['additional']['exception']->getTraceAsString()); } } } /** * Closes the syslog connection * * @return void */ public function __destruct() { // Close connection to syslog closelog(); } }