0

With Zend Framework 1.12 you can use Zend_Log_Writer_Firebug to write log information to the firebug console. Is there a way to pass the output to the chrome debugger console?

$logger = new Zend_Log();
$writer = 'production' == $this->getEnvironment() ? new Zend_Log_Writer_Stream(APPLICATION_PATH .'/../data/logs/app.log') : new Zend_Log_Writer_Firebug();

$logger->addWriter($writer);
if ('production' == $this->getEnvironment()) {
        $filter = new Zend_Log_Filter_Priority(Zend_Log::DEBUG);
        $logger->addFilter($filter);
}

$this->_logger = $logger;
Zend_Registry::set('log', $logger);
}
blackbishop
  • 30,945
  • 11
  • 55
  • 76
HH.
  • 197
  • 3
  • 17

1 Answers1

0

I am using Chrome Logger. It's a little bit more complicated than with Firebug but no big deal:

  1. install the extension for your Chrome browser
  2. include ChromePHP in your composer.json (that's the way I do it - if you have a different application include path, put it there)
  3. now you can use Zend\Log\Writer\ChromePHP to send debug-information to your Chrome-console.
Stephan Weinhold
  • 1,623
  • 1
  • 28
  • 37