Code to setup FirePHP in ZendFramework


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.