Add

Cutting Use of Zend_Log in Half - The Easy Way

After reading Tony Bibbs post on how he cut his usage of Zend_Log in half by taking

$logger = Zend_Registry::get('logger');
$logger->log($errorMessage,1);

And creating

MyLog::log('Kernel starting up');

While the benefits of abstracting the Zend code away from your code to allow you to switch to another logger at some other time are all well and good. If you just want to reduce your line count, surely simply doing the following would do the same.

Zend_Registry::get('logger')->log($errorMessage,1);
blog comments powered by Disqus

Twitter