2009-08-19 05:55:23 +02:00
|
|
|
<?php
|
|
|
|
/**
|
2009-08-19 23:55:03 +02:00
|
|
|
* Extensions to Zend_Log to make it work nicer
|
|
|
|
* with {@link SSLog}.
|
|
|
|
*
|
|
|
|
* Please refer to {@link SSLog} for information on
|
|
|
|
* setting up logging for your projects.
|
2009-08-19 05:55:23 +02:00
|
|
|
*
|
|
|
|
* @package sapphire
|
|
|
|
* @subpackage dev
|
|
|
|
*/
|
|
|
|
|
|
|
|
require_once 'Zend/Log.php';
|
|
|
|
|
|
|
|
class SSZendLog extends Zend_Log {
|
2009-08-19 07:16:58 +02:00
|
|
|
|
2009-08-19 23:55:03 +02:00
|
|
|
/**
|
|
|
|
* Get all writers in this logger.
|
|
|
|
* @return array of Zend_Log_Writer_Abstract instances
|
|
|
|
*/
|
2009-08-19 05:55:23 +02:00
|
|
|
public function getWriters() {
|
|
|
|
return $this->_writers;
|
|
|
|
}
|
2009-08-19 07:16:58 +02:00
|
|
|
|
2009-08-19 05:55:23 +02:00
|
|
|
/**
|
2009-08-19 23:55:03 +02:00
|
|
|
* Remove a writer instance that exists in this logger.
|
2009-08-19 05:55:23 +02:00
|
|
|
* @param object Zend_Log_Writer_Abstract instance
|
|
|
|
*/
|
|
|
|
public function removeWriter($writer) {
|
|
|
|
foreach($this->_writers as $index => $existingWriter) {
|
|
|
|
if($existingWriter == $writer) {
|
|
|
|
unset($this->_writers[$index]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2009-08-19 07:16:58 +02:00
|
|
|
|
2009-08-19 23:55:03 +02:00
|
|
|
/**
|
|
|
|
* Clear all writers in this logger.
|
|
|
|
*/
|
|
|
|
public function clearWriters() {
|
|
|
|
$this->_writers = array();
|
|
|
|
}
|
|
|
|
|
2009-08-19 05:55:23 +02:00
|
|
|
}
|