views:

268

answers:

2

I'm having a spot of bother getting anything to log with FirePHP and Zend Framework. Firebug is installed and the site is in the allowed list. I don't know if there are any other tests I can do to check FirePHP.

Bootstrap :

protected function _initActionHelper()
{
 $writer = new Zend_Log_Writer_Firebug();
 $logger = new Zend_Log($writer);
 Zend_Registry::set('logger', $logger);
}

Controller :

class IndexController extends Zend_Controller_Action
{
    protected $logger;

    public function init()
        {
         $this->logger = Zend_Registry::get('logger');
        }

        public function indexAction()
        {
            $this->logger->log('ALERT', Zend_Log::ALERT);
        }
}
A: 

Reset of FireBug and re-install of FirePHP and it all started working.

piddl0r
A: 

Have you made sure that firebug is actually working? I went around in circles for hours one day only to find out that firebug itself was not really working. I had to downgrade to Firebug 1.4.2 (which you can get from http://getfirebug.com/releases/firebug/1.4/ ).

I would put some simple javascript on the site with a console.log statement to test firebug first.

<script type="text/javascript">
console.debug('testing firebug);
</script>

If that is working I would then check to make sure that the firephp headers are actually being sent. If you open the firebug section in firefox and then go to the net tab you should be able to see the response headers sent from your site.

If the headers aren't being sent I'm not sure how much help I can be, but I would look into Zend_Wildfire ( http://framework.zend.com/manual/en/zend.wildfire.html#zend.wildfire.chapter ) and see if there may be something there.

Mike
Yeah it was firebug at fault. I'm logging away now :)
piddl0r