2009-08-19 05:55:23 +02:00
|
|
|
<?php
|
2010-10-13 05:53:12 +02:00
|
|
|
require_once 'Zend/Log.php';
|
|
|
|
|
2009-08-19 05:55:23 +02:00
|
|
|
/**
|
2009-08-19 23:55:03 +02:00
|
|
|
* Extensions to Zend_Log to make it work nicer
|
API CHANGE: Renamed conflicting classes to have an "SS_" namespace, and renamed existing "SS" namespace to "SS_". The affected classes are: HTTPRequest, HTTPResponse, Query, Database, SSBacktrace, SSCli, SSDatetime, SSDatetimeTest, SSLog, SSLogTest, SSLogEmailWriter, SSLogErrorEmailFormatter, SSLogErrorFileFormatter, SSLogFileWriter and SSZendLog.
MINOR: Replaced usage of renamed classes with the new namespaced name.
From: Andrew Short <andrewjshort@gmail.com>
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90075 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-26 04:06:31 +01:00
|
|
|
* with {@link SS_Log}.
|
2009-08-19 23:55:03 +02:00
|
|
|
*
|
API CHANGE: Renamed conflicting classes to have an "SS_" namespace, and renamed existing "SS" namespace to "SS_". The affected classes are: HTTPRequest, HTTPResponse, Query, Database, SSBacktrace, SSCli, SSDatetime, SSDatetimeTest, SSLog, SSLogTest, SSLogEmailWriter, SSLogErrorEmailFormatter, SSLogErrorFileFormatter, SSLogFileWriter and SSZendLog.
MINOR: Replaced usage of renamed classes with the new namespaced name.
From: Andrew Short <andrewjshort@gmail.com>
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90075 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-26 04:06:31 +01:00
|
|
|
* Please refer to {@link SS_Log} for information on
|
2009-08-19 23:55:03 +02:00
|
|
|
* setting up logging for your projects.
|
2009-08-19 05:55:23 +02:00
|
|
|
*
|
|
|
|
* @package sapphire
|
|
|
|
* @subpackage dev
|
|
|
|
*/
|
API CHANGE: Renamed conflicting classes to have an "SS_" namespace, and renamed existing "SS" namespace to "SS_". The affected classes are: HTTPRequest, HTTPResponse, Query, Database, SSBacktrace, SSCli, SSDatetime, SSDatetimeTest, SSLog, SSLogTest, SSLogEmailWriter, SSLogErrorEmailFormatter, SSLogErrorFileFormatter, SSLogFileWriter and SSZendLog.
MINOR: Replaced usage of renamed classes with the new namespaced name.
From: Andrew Short <andrewjshort@gmail.com>
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90075 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-26 04:06:31 +01:00
|
|
|
class SS_ZendLog 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();
|
|
|
|
}
|
|
|
|
|
2012-03-24 04:04:52 +01:00
|
|
|
}
|