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-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
version | $Id$ |
inherited_from | \Zend_Log_Writer_Abstract |
__construct(\Zend_Mail $mail, \Zend_Layout $layout = null
) : 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_Mail
Mail instance
\Zend_Layout
Layout instance; optional
addFilter(\Zend_Log_Filter_Interface|integer $filter) : \Zend_Log_Writer_Abstract
\Zend_Log_Filter_Interface
integer
Filter class or filter priority
\Zend_Log_Exception |
---|
\Zend_Log_Writer_Abstract
factory(array|\Zend_Config $config) : \Zend_Log_Writer_Mail
array
\Zend_Config
\Zend_Log_Writer_Mail
getLayoutFormatter() : \Zend_Log_Formatter_Interface | null
\Zend_Log_Formatter_Interface
null
The formatter, or null.setFormatter(\Zend_Log_Formatter_Interface $formatter) : \Zend_Log_Writer_Abstract
\Zend_Log_Formatter_Interface
\Zend_Log_Writer_Abstract
setLayout(\Zend_Layout|array $layout) : \Zend_Log_Writer_Mail
\Zend_Layout
array
\Zend_Log_Exception |
---|
\Zend_Log_Writer_Mail
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 |
---|
\Zend_Log_Writer_Mail
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.
string
Subject prepend text.
\Zend_Log_Exception |
---|
\Zend_Log_Writer_Mail
shutdown() : void
inherited_from | \Zend_Log_Writer_Abstract::shutdown() |
---|
shutdown() : void
write(array $event) : void
array
log data event
_constructLayoutFromConfig(array $config) : \Zend_Layout
array
\Zend_Log_Exception |
---|
\Zend_Layout
_constructMailFromConfig(array $config) : \Zend_Mail
array
\Zend_Log_Exception |
---|
\Zend_Mail
_getFormattedNumEntriesPerPriority() : string
string
_parseConfig(array|\Zend_Config $config) : array
array
\Zend_Config
Zend_Config or Array
\Zend_Log_Exception |
---|
array
_write(array $event) : void
Handles the formatting of both plaintext entries, as well as those rendered with Zend_Layout.
inherited_from | \Zend_Log_Writer_Abstract::_write() |
---|
array
Event data
_write(array $event) : void
array
log data event
$_eventsToMail : array
array()
$_filters : array
array()
$_formatter : \Zend_Log_Formatter_Interface
$_layout : \Zend_Layout
$_layoutEventsToMail : array
array()
$_layoutFormatter : \Zend_Log_Formatter_Interface
$_mail : \Zend_Mail
$_methodMapHeaders : array
array('from' => 'setFrom', 'to' => 'addTo', 'cc' => 'addCc', 'bcc' => 'addBcc')
$_numEntriesPerPriority : array
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.