/** * Add a writer. A writer is responsible for taking a log * message and writing it out to storage. * * @param Zend_Log_Writer_Abstract $writer * @return void */ public static function addWriter(Zend_Log_Writer_Abstract $writer) { if (!self::$_log) { return; } self::$_log->addWriter($writer); }
public function testFactorySupportsPHP53Namespaces() { if (version_compare(PHP_VERSION, '5.3.0') < 0) { $this->markTestSkipped('PHP < 5.3.0 does not support namespaces'); } // preload namespaced class from custom path Zend_Loader::loadClass('\\Zfns\\Writer', array(dirname(__FILE__) . '/_files')); try { $config = array('mine' => array('writerName' => 'Writer', 'writerNamespace' => '\\Zfns\\')); $logger = Zend_log::factory($config); $logger->info('this is a test'); } catch (Zend_Log_Exception $e) { $this->fail('Unable to load namespaced class'); } }