silverstripe-framework/dev/SSZendLog.php
Sean Harvey a682ab9c0e API CHANGE Moved Debug::backtrace() to SSBacktrace::backtrace()
API CHANGE Moved Debug::get_rendered_backtrace() to SSBacktrace::get_rendered_backtrace()
ENHANCEMENT Added SSLog, SSLogEmailWriter and SSLogErrorEmailFormatter for silverstripe message reporting
API CHANGE Debug::send_errors_to() and Debug::send_warnings_to() are deprecated in favour of SSLog. See class documentation for SSLog on configuration of error email notifications
MINOR Added SSLogTest for basic testing of the SSLog and SSLogEmailWriter classes



git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84774 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-19 03:55:23 +00:00

34 lines
748 B
PHP

<?php
/**
* Modifications to Zend_Log to make it work nicer
* with SSErrorLog. Specifically, this includes removing
* writers that have been added to the logger, as well as
* listing which ones are currently in use.
*
* @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]);
}
}
}
}