## Class TEmailLogRoute

Description

TEmailLogRoute class.

TEmailLogRoute sends selected log messages to email addresses. The target email addresses may be specified via Emails property. Optionally, you may set the email Subject and the SentFrom address.

- since: 3.0
- version: $Id: TLogRouter.php 2112 2007-08-06 18:58:55Z xue $
- author: Qiang Xue <qiang.xue@gmail.com>

Located in /Util/TLogRouter.php (line 463)

    TComponent
       |
       --TApplicationComponent
          |
          --TLogRoute
             |
             --TEmailLogRoute

Class Constant Summary
DEFAULT_SUBJECT = 'Prado Application Log'
EMAIL_PATTERN = '/^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$/'
Method Summary
array getEmails ()
string getSentFrom ()
string getSubject ()
void init (TXmlElement $config)
void processLogs (array $logs)
array|string setEmails (mixed $emails)
void setSentFrom (string $value)
void setSubject (string $value)
Variables

#### Inherited Variables

Inherited from TLogRoute

> TLogRoute::$_levelNames
> TLogRoute::$_levelValues

Methods
getEmails (line 518)

- return: list of destination email addresses
- access: public

array getEmails ()
getSentFrom (line 564)

- return: send from address of the email
- access: public

string getSentFrom ()
getSubject (line 546)

- return: email subject. Defaults to TEmailLogRoute::DEFAULT_SUBJECT
- access: public

string getSubject ()
init (line 492)

Initializes the route.

- access: public
- throws: TConfigurationException if SentFrom is empty and 'sendmail_from' in php.ini is also empty.

void init (TXmlElement $config)

- TXmlElement $config: configurations specified in TLogRouter.

Redefinition of:

TLogRoute::init()
  Initializes the route.

processLogs (line 504)

Sends log messages to specified email addresses.

- access: protected

void processLogs (array $logs)

- array $logs: list of log messages

Redefinition of:

TLogRoute::processLogs()
  Processes log messages and sends them to specific destination.

setEmails (line 527)

- return: list of destination email addresses. If the value is a string, it is assumed to be comma-separated email addresses.
- access: public

array|string setEmails (mixed $emails)
setSentFrom (line 572)

- access: public

void setSentFrom (string $value)

- string $value: send from address of the email

setSubject (line 556)

- access: public

void setSubject (string $value)

- string $value: email subject.

#### Inherited Methods

Inherited From TLogRoute

> TLogRoute::collectLogs()
> TLogRoute::formatLogMessage()
> TLogRoute::getCategories()
> TLogRoute::getLevelName()
> TLogRoute::getLevels()
> TLogRoute::getLevelValue()
> TLogRoute::init()
> TLogRoute::processLogs()
> TLogRoute::setCategories()
> TLogRoute::setLevels()

Inherited From TApplicationComponent

> TApplicationComponent::getApplication()
> TApplicationComponent::getRequest()
> TApplicationComponent::getResponse()
> TApplicationComponent::getService()
> TApplicationComponent::getSession()
> TApplicationComponent::getUser()
> TApplicationComponent::publishAsset()
> TApplicationComponent::publishFilePath()

Inherited From TComponent

> TComponent::addParsedObject()
> TComponent::attachEventHandler()
> TComponent::canGetProperty()
> TComponent::canSetProperty()
> TComponent::createdOnTemplate()
> TComponent::detachEventHandler()
> TComponent::evaluateExpression()
> TComponent::evaluateStatements()
> TComponent::getEventHandlers()
> TComponent::getSubProperty()
> TComponent::hasEvent()
> TComponent::hasEventHandler()
> TComponent::hasProperty()
> TComponent::raiseEvent()
> TComponent::setSubProperty()
> TComponent::__get()
> TComponent::__set()

Class Constants
DEFAULT_SUBJECT = 'Prado Application Log' (line 472)

Default email subject.

EMAIL_PATTERN = '/^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$/' (line 468)

Regex pattern for email address.

Documentation generated on Sun, 30 Sep 2007 19:16:39 -0400 by phpDocumentor 1.3.0RC4