| Fully Qualified Name: | Zend\Log\Writer\Mail |
| Extends: | AbstractWriter |
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\Message object. Note that this class only sends the email upon completion, so any log entries accumulated are sent in a single email. The email is sent using a Zend\Mail\Transport\TransportInterface object (Sendmail is default).
| Name | Description | Defined By |
|---|---|---|
| __construct() | Constructor | |
| addFilter() | Add a filter specific to this writer. | AbstractWriter |
| filterPlugin() | Get filter instance | AbstractWriter |
| formatterPlugin() | Get formatter instance | AbstractWriter |
| getFilterPluginManager() | Get filter plugin manager | AbstractWriter |
| getFormatterPluginManager() | Get formatter plugin manager | AbstractWriter |
| setConvertWriteErrorsToExceptions() | Set convert write errors to exception flag | AbstractWriter |
| setFilterPluginManager() | Set filter plugin manager | AbstractWriter |
| setFormatter() | Set a new formatter for this writer | AbstractWriter |
| setFormatterPluginManager() | Set formatter plugin manager | AbstractWriter |
| setSubjectPrependText() | Allows caller to have the mail subject dynamically set to contain the entry counts per-priority level. | |
| setTransport() | Set the transport message | |
| shutdown() | Sends mail to recipient(s) if log entries are present. Note that both plaintext and HTML portions of email are handled here. | |
| write() | Log a message to this writer. | AbstractWriter |
Constructor
| Parameter Name | Type | Description |
|---|---|---|
| \MailMessage|array|\Traversable | ||
| $transport | \Transport\TransportInterface | Optional |
Returns:
Add a filter specific to this writer.
| Parameter Name | Type | Description |
|---|---|---|
| $filter | int|string|\Filter\FilterInterface | |
| $options | array|null |
Returns: \AbstractWriter
Get filter instance
| Parameter Name | Type | Description |
|---|---|---|
| $name | string | |
| $options | array|null |
Returns: \Filter\FilterInterface
Get formatter instance
| Parameter Name | Type | Description |
|---|---|---|
| $name | string | |
| $options | array|null |
Returns: \Formatter\FormatterInterface
Get filter plugin manager
Returns: \LogFilterPluginManager
Get formatter plugin manager
Returns: \LogFormatterPluginManager
Set convert write errors to exception flag
| Parameter Name | Type | Description |
|---|---|---|
| $convertErrors | bool |
Returns:
Set filter plugin manager
| Parameter Name | Type | Description |
|---|---|---|
| $plugins | string|\LogFilterPluginManager |
Returns: self
Set a new formatter for this writer
| Parameter Name | Type | Description |
|---|---|---|
| $formatter | string|\Formatter\FormatterInterface | |
| $options | array|null |
Returns: self
Set formatter plugin manager
| Parameter Name | Type | Description |
|---|---|---|
| $plugins | string|\LogFormatterPluginManager |
Returns: self
Allows caller to have the mail subject dynamically set to contain the entry counts per-priority level.
Sets the text for use in the subject, with entry counts per-priority level appended to the end. Since a Zend\Mail\Message subject can only be set once, this method cannot be used if the Zend\Mail\Message object already has a subject set.
| Parameter Name | Type | Description |
|---|---|---|
| $subject | string | Subject |
Returns: \Mail
Set the transport message
| Parameter Name | Type | Description |
|---|---|---|
| $transport | \Transport\TransportInterface |
Returns: \Mail
Sends mail to recipient(s) if log entries are present. Note that both plaintext and HTML portions of email are handled here.
Returns:
Log a message to this writer.
| Parameter Name | Type | Description |
|---|---|---|
| $event | array | log |
Returns: void