__construct()
addFilter()
factory()
getLayoutFormatter()
setFormatter()
setLayoutFormatter()
setSubjectPrependText()
shutdown()
write()
_getFormattedNumEntriesPerPriority()
_parseConfig()
_write()
$_eventsToMail
$_filters
$_formatter
$_layout
$_layoutEventsToMail
$_layoutFormatter
$_mail
$_numEntriesPerPriority
$_subjectPrependText
Class used for writing log messages to email via Zend_Mail.
Allows for emailing log messages at and above a certain level via a Zend_Mail object. Note that this class only sends the email upon completion, so any log entries accumulated are sent in a single email.
| category | Zend |
|---|---|
| package | Zend_Log |
| subpackage | Writer |
| copyright | Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
| license | New BSD License |
| version | $Id: Mail.php 20096 2010-01-06 02:05:09Z bkarwin $ |
__construct(Zend_Mail $mail, Zend_Layout $layout) : void
Constructs the mail writer; requires a Zend_Mail instance, and takes an optional Zend_Layout instance. If Zend_Layout is being used, $this->_layout->events will be set for use in the layout template.
\Zend_MailMail instance
\Zend_LayoutLayout instance; optional
addFilter(\Zend_Log_Filter_Interface $filter) : void
factory(array | \Zend_Config $config) : \Zend_Log_Writer_Mail
getLayoutFormatter() : \Zend_Log_Formatter_Interface | null
\Zend_Log_Formatter_InterfacenullThe formatter, or null.setFormatter(\Zend_Log_Formatter_Interface $formatter) : void
| inherited_from | \Zend_Log_Writer_Abstract::setFormatter() |
|---|
\Zend_Log_Formatter_Interface
setLayoutFormatter(Zend_Log_Formatter_Interface $formatter) : \Zend_Log_Writer_Mail
Allows use of a second formatter on lines that will be rendered with Zend_Layout. In the event that Zend_Layout is not being used, this formatter cannot be set, so an exception will be thrown.
\Zend_Log_Formatter_Interface
\Zend_Log_Exception |
|---|
setSubjectPrependText(string $subject) : \Zend_Log_Writer_Mail
Sets the text for use in the subject, with entry counts per-priority level appended to the end. Since a Zend_Mail subject can only be set once, this method cannot be used if the Zend_Mail object already has a subject set.
stringSubject prepend text.
shutdown() : void
write(array $event) : void
| inherited_from | \Zend_Log_Writer_Abstract::write() |
|---|
arraylog data event
_getFormattedNumEntriesPerPriority() : string
string_parseConfig(array | \Zend_Config $config) : array
| inherited_from | \Zend_Log_Writer_Abstract::_parseConfig() |
|---|
\Zend_Log_Exception |
|---|
array_write(array $event) : void
Handles the formatting of both plaintext entries, as well as those rendered with Zend_Layout.
arrayEvent data
$_eventsToMail : array
$_filters : array
| inherited_from | \Zend_Log_Writer_Abstract::$$_filters |
|---|
$_formatter : \Zend_Log_Formatter_Interface
| inherited_from | \Zend_Log_Writer_Abstract::$$_formatter |
|---|
$_layout : \Zend_Layout
$_layoutEventsToMail : array
$_layoutFormatter : \Zend_Log_Formatter_Interface
$_mail : \Zend_Mail
$_numEntriesPerPriority : array
$_subjectPrependText : string | null
Can only be used of the Zend_Mail object has not already had its subject line set. Using this will cause the subject to have the entry counts per-priority level appended to it.