Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Zend Framework: Zend_Log_Writer_Mail Component Proposal

Proposed Component Name Zend_Log_Writer_Mail
Developer Notes http://framework.zend.com/wiki/display/ZFDEV/Zend_Log_Writer_Mail
Proposers Brian DeShong
Revision 1.0 - 26 January 2008 - Initial creation (wiki revision: 18)

Table of Contents

1. Overview

Zend_Log_Writer_Mail is a Zend_Log writer for sending log entries to recipient(s) via email.

Proposal of this class is motivated by use in a batch script environment, where logs need to be kept, but developers also need to be notified via email of any notices, warnings, errors, etc.; will be illustrated below in "Use Cases."

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

  • This component will attempt to deliver appropriate log entries to given recipient(s)
  • This component will adhere to standard Zend_Log_Writer formatting and filtering conventions
  • This component will not open connections to the Zend_Mail transport until a message is ready to be sent

4. Dependencies on Other Framework Components

  • Zend_Mail
  • Zend_Log_Writer_Abstract

5. Theory of Operation

User instantiates a Zend_Mail object and populates it with data for recipients that should be notified of any log entries. Zend_Mail object is then passed to constructor for Zend_Log_Writer_Mail object.

Zend_Log_Writer_Mail::_write() builds up an array of log entry lines to use as the body of the email message to the recipients.

Email should not be sent upon the call of Zend_Log_Writer_Mail::_write(); the email should be sent upon the call to shutdown() if there are log entry lines to use in the body.

Once email has been sent to recipients, reference to Zend_Mail object is NOT removed as the user may want to continue using it.

6. Milestones / Tasks

  • Milestone 1: [DONE] Initial class code is drafted for proposal
  • Milestone 2: [DONE] Proposal finalized and readied for review
  • Milestone 3: Working prototype checked in to incubator for community review
  • Milestone 3: Unit tests are created with 90%+ code coverage (assume that we can't test the actual receiving of email?)
  • Milestone 4: Initial documentation completed

7. Class Index

  • Zend_Log_Writer_Mail

8. Use Cases

UC-01
UC-02
UC-03

9. Class Skeletons

]]></ac:plain-text-body></ac:macro>

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.