silverstripe-framework/dev/SSZendLog.php
Sean Harvey e13316d0dc MINOR Documentation updates to SSZendLog
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84805 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-19 05:16:58 +00:00

35 lines
805 B
PHP

<?php
/**
* Modifications to Zend_Log to make it work nicer
* with {@link SSLog}. Specifically, this includes removing
* writers that have been added to the logger, as well as
* listing which ones are currently in use since the Zend_Log
* API does not support these methods.
*
* @package sapphire
* @subpackage dev
*/
require_once 'Zend/Log.php';
class SSZendLog extends Zend_Log {
public function getWriters() {
return $this->_writers;
}
/**
* Remove a writer instance that exists in
* the current writers collection for this logger.
*
* @param object Zend_Log_Writer_Abstract instance
*/
public function removeWriter($writer) {
foreach($this->_writers as $index => $existingWriter) {
if($existingWriter == $writer) {
unset($this->_writers[$index]);
}
}
}
}