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}.
|
2014-08-15 08:53:05 +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.
|
2014-08-15 08:53:05 +02:00
|
|
|
*
|
2012-04-12 08:02:46 +02:00
|
|
|
* @package framework
|
2009-08-19 05:55:23 +02:00
|
|
|
* @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.
|
2017-11-30 18:49:46 +01:00
|
|
|
* @param SS_Object Zend_Log_Writer_Abstract instance
|
2009-08-19 05:55:23 +02:00
|
|
|
*/
|
|
|
|
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
|
|
|
}
|