Zend Framework: Zend_Log_Filter_Throttle Component Proposal
| Proposed Component Name | Zend_Log_Filter_Throttle |
|---|---|
| Developer Notes | http://framework.zend.com/wiki/display/ZFDEV/Zend_Log_Filter_Throttle |
| Proposers | Goran Juric |
| Zend Liaison | TBD |
| Revision | 1.0 - 5 September 2010: Initial Draft. (wiki revision: 7) |
Table of Contents
1. Overview
Zend_Log_Filter_Throttle is a simple component that throttles messages that are appended to logs. Throttling is set in a number of seconds that must pass before the log filter accepts a log event again. This filter will be very useful for throttling messages that are passing through Zend_Log_Writer_Mail to avoid spamming your inbox with messages.
2. References
- no references
3. Component Requirements, Constraints, and Acceptance Criteria
- This component will allow throttling of log messages.
- This component will not check the content of log messages, priorities and other event data.
4. Dependencies on Other Framework Components
- Zend_Log_Filter_Abstract
- Zend_Log_Exception
5. Theory of Operation
The component is instantiated with two parameters. The file that will be used to check when the last message was accepted by this filter and a number of seconds that must pass before the filter starts accepting log messages again.
The component uses a file on the file system and checks when the file was last modified and uses this information to accept or reject a log message. After accepting a message the files last modified time is set to the current time.
6. Milestones / Tasks
- Milestone 1: [DONE] design notes will be published here
- Milestone 2: Community review
- Milestone 3: Working prototype checked into the incubator
- Milestone 4: Unit tests exist, work, and are checked into SVN.
- Milestone 5: Initial documentation exists.
7. Class Index
- Zend_Log_Filter_Throttle
8. Use Cases
| UC-01 | Setup log writer using Zend_Log_Filter_Throttle |
|---|
It is advised to add Zend_Log_Filter_Priority filter to the log writer before Zend_Log_Filter_Throttle so that only messages that should be accepted by this log writer update the time when the last log message was accepted.
1 Comment
comments.show.hideFeb 08, 2011
Dolf Schimmel (Freeaqingme)
Archiving this proposal, feel free to recover it when you want to work on it again. For more details see this email.