1 <?php
2 require_once 'Zend/Log.php';
3
4 /**
5 * Extensions to Zend_Log to make it work nicer
6 * with {@link SS_Log}.
7 *
8 * Please refer to {@link SS_Log} for information on
9 * setting up logging for your projects.
10 *
11 * @package sapphire
12 * @subpackage dev
13 */
14 class SS_ZendLog extends Zend_Log {
15
16 /**
17 * Get all writers in this logger.
18 * @return array of Zend_Log_Writer_Abstract instances
19 */
20 public function getWriters() {
21 return $this->_writers;
22 }
23
24 /**
25 * Remove a writer instance that exists in this logger.
26 * @param object Zend_Log_Writer_Abstract instance
27 */
28 public function removeWriter($writer) {
29 foreach($this->_writers as $index => $existingWriter) {
30 if($existingWriter == $writer) {
31 unset($this->_writers[$index]);
32 }
33 }
34 }
35
36 /**
37 * Clear all writers in this logger.
38 */
39 public function clearWriters() {
40 $this->_writers = array();
41 }
42
43 }