better implementaion of a global Zend_Log instance?

ITSROFLTIME

New Member
Is there a better way to have a globally accessible Zend_Log object?In Bootstrap.php I'm doing:\[code\]protected function _initLogging(){ $logger = new Zend_Log(); $writer = new Zend_Log_Writer_Stream(APPLICATION_PATH . '/../app.log'); $logger->addWriter($writer); Zend_Registry::set('log', $logger);}\[/code\]Then throughout the application I'll use:\[code\]Zend_Registry::get('log')->debug('hello world');\[/code\]It's not horrible I guess. It just seems kind of verbose.
 
Back
Top