/** * Write a message to the log. * * @param array $event Log event. * * @return boolean True. */ public function write($event) { if (!empty($this->_options['ident'])) { $event['message'] = $this->_options['ident'] . ' ' . $event['message']; } $category = isset($event['category']) ? $event['category'] : $this->_options['category']; $message = $this->_formatter->format($event); if (!$this->_options['addNewline']) { $message = rtrim($message); } $this->_scribe->log($category, $message); return true; }
<?php /** * Simple Scribe logging example * * @category Horde * @package Scribe */ require 'Horde/Autoloader.php'; $scribe = new Horde_Scribe_Client(); $scribe->connect('localhost', 1463); $scribe->log('keyword', 'This is a message for the keyword category');