News Feed
Sections




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

Zend Developer Zone:
Zend_Log timestamp filter
July 19, 2010 @ 12:24:48

On the Zend Developer Zone there's a recent post about a custom filter that's been developed to help filter events based on time instead of just logging them as a whole.

For one of my recent project, which is using Zend_Log component of the Zend Framework, I had a demand in which I needed to be able to filter log events based on the time they occurred. As out of the box, Zend_Log component does not have such filter, I decided to create one that will fulfill my demands.

The log filter, NP_Log_Filter_Timestamp, it allows you to set rules for things like hour, minute year, day of the week, etc. and can be used anywhere you'd create a normal Zend_Log instance. Pass it in the format you'd like to use (that idate can use), a value to evaluate and a comparison operator. Two code snippets show how it's used.

0 comments voice your opinion now!
zendframework zendlog custom filter timestamp


blog comments powered by Disqus

Similar Posts

Till Klampaeckel's Blog: Debugging Zend_Test

SecWatch.org: CJ Tag Board Multiple Parameter Handling PHP Code Injection Vulnerabilities

Ryan Mauger's Blog: Controller Testing with the FlashMessenger in Zend Framework

Padraic Brady's Blog: Self-Contained Reusable Zend Framework Modules With Standardised Configurators

Stefan Koopmanschap's Blog: Using custom namespaces with (C/S)ilex and Composer


Community Events





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


release version podcast framework laravel community library introduction voicesoftheelephpant interview tool composer opinion application package series language update security symfony

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