I have a fresh install of Zend Framework v1.10.5 on my application server. The only modifications are the two init methods below in which I simply set up a logger and write to it as a part of the bootstrap process.
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected $_log;
protected function _initLogging()
{
$log = new Zend_Log();
$writer = new Zend_Log_Writer_Stream(
APPLICATION_PATH . '/../data/logs/app.log');
$log->addWriter($writer);
$this->_log = $log;
$this->_log->info('Logging initialized.');
}
protected function _initHello()
{
$this->_log->debug('Hello!');
}
}
When I make a request (initializing the application), the following lines appear in my app.log...
2010-06-04T05:24:41+00:00 INFO (6): Logging initialized.
2010-06-04T05:24:41+00:00 DEBUG (7): Hello!
2010-06-04T05:24:41+00:00 INFO (6): Logging initialized.
2010-06-04T05:24:41+00:00 DEBUG (7): Hello!
Can someone please explain why Zend appears to be bootstrapping the application twice? Again, this is a completely fresh (out-of-the-box) instance of Zend Framework.