News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Kevin Shroeder's Blog:
Zend_Log with multiple writers
September 14, 2010 @ 10:39:34

Kevin Schroeder has a recent post to his blog about a handy trick Zend Framework developers can use to have Zend_Log write out to multiple sources at once pretty easily.

If you were not aware, Zend_Log provides facilities for writing to multiple logs through the same log instance. Additionally, you can do this via configuration options when using a Zend_Application resource plugin. Together those make for very powerful logging mechanisms. "How?" you ask? It's really easy.

The trick lies in the application.ini file configuration. He includes an example of how you can set this up showing how to make two different environments log differently - development writes to log/firebug and production just writes to the log. He includes some sample code for a basic controller showing you how to use it.

0 comments voice your opinion now!
zendlog zendframework tutorial multiple write development production


blog comments powered by Disqus

Similar Posts

Matthew Leverton\'s Blog: How to add a custom CAPTCHA to phpBB2

SitePoint PHP Blog: Message Queues: Comparing Beanstalkd, IronMQ and Amazon SQS

Freeaqingme's Blog: PHP, JS & Service layers: Blend like never before

William Durand: REST APIs with Symfony2: The Right Way

Michael Nitschinger's Blog: Handling JSON like a boss in PHP


Community Events





Don't see your event here?
Let us know!


symfony2 list laravel code series developer threedevsandamaybe introduction configure community podcast testing opinion release interview framework language unittest refactor install

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework