zendframework/zf2 — pull request #6058 by nikolaposa (2014-03-29 10:58:00+00:00)
Title: Timestamp log filter

Log filter which provides ability to filter log events based on the time when they were triggered.

It can be configured by specifying idate()-compliant format character and desired value or a DateTime instance for direct comparison with the log event's timestamp. Comparison operator must also be supplied in either cases.

Example usage:
```php
use Zend\Log\Logger;
use \Zend\Log\Writer\Stream as StreamWriter;
use Zend\Log\Filter\Timestamp as TimestampFilter;

$logger = new Logger();

$writer = new StreamWriter('/path/to/first/logfile');
//Log only events between 10 and 13 hours
$writer->addFilter(new TimestampFilter(10, 'H', '>='));
$writer->addFilter(new TimestampFilter(12, 'H', '<='));
$logger->addWriter($writer);
```