2009-08-19 03:55:23 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Modifications to Zend_Log to make it work nicer
|
2009-08-19 05:16:58 +00:00
|
|
|
* with {@link SSLog}. Specifically, this includes removing
|
2009-08-19 03:55:23 +00:00
|
|
|
* writers that have been added to the logger, as well as
|
2009-08-19 05:16:58 +00:00
|
|
|
* listing which ones are currently in use since the Zend_Log
|
|
|
|
* API does not support these methods.
|
2009-08-19 03:55:23 +00:00
|
|
|
*
|
|
|
|
* @package sapphire
|
|
|
|
* @subpackage dev
|
|
|
|
*/
|
|
|
|
|
|
|
|
require_once 'Zend/Log.php';
|
|
|
|
|
|
|
|
class SSZendLog extends Zend_Log {
|
2009-08-19 05:16:58 +00:00
|
|
|
|
2009-08-19 03:55:23 +00:00
|
|
|
public function getWriters() {
|
|
|
|
return $this->_writers;
|
|
|
|
}
|
2009-08-19 05:16:58 +00:00
|
|
|
|
2009-08-19 03:55:23 +00:00
|
|
|
/**
|
|
|
|
* 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]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2009-08-19 05:16:58 +00:00
|
|
|
|
2009-08-19 03:55:23 +00:00
|
|
|
}
|