예제 #1
0
파일: Scribe.php 프로젝트: jubinpatel/horde
 /**
  * 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;
 }
예제 #2
0
파일: scribe.php 프로젝트: jubinpatel/horde
<?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');