Is there a better way to have a globally accessible Zend_Log object?
In Bootstrap.php I'm doing:
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);
}
Then throughout the application I'll use:
Zend_Registry::get('log')->debug('hello world');
It's not horrible I guess. It just seems kind of verbose.