Posted By

Blerx on 07/19/11


Tagged

firephp zendframework


Versions (?)

Code to setup FirePHP in ZendFramework


 / Published in: PHP
 

  1. // Place this in your bootstrap file before dispatching your front controller
  2. $logger = new Zend_Log();
  3. $writer = new Zend_Log_Writer_Firebug();
  4. $logger->addWriter($writer);
  5.  
  6. //make an instance of your logger you can use
  7. Zend_Registry::set('logger',$logger);
  8.  
  9.  
  10. //Place this code where needed
  11. $logger = Zend_Registry::get('logger');
  12. $logger->log('This is a log message!', Zend_Log::INFO);

Report this snippet  

You need to login to post a comment.