## Class TLogRouter

Description

TLogRouter class.

TLogRouter manages routes that record log messages in different media different ways. For example, a file log route TFileLogRoute records log messages in log files. An email log route TEmailLogRoute sends log messages to email addresses.

Log routes may be configured in application or page folder configuration files or an external configuration file specified by ConfigFile. The format is as follows,

       &lt;route class="TFileLogRoute" Categories="System.Web.UI" Levels="Warning" /&gt;
       &lt;route class="TEmailLogRoute" Categories="Application" Levels="Fatal" Emails="admin@pradosoft.com" /&gt;

You can specify multiple routes with different filtering conditions and different targets, even if the routes are of the same type.

- since: 3.0
- version: $Revision: $ $Date: $
- author: Qiang Xue <qiang.xue@gmail.com>

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

    TComponent
       |
       --TApplicationComponent
          |
          --TModule
             |
             --TLogRouter

Class Constant Summary
CONFIG_FILE_EXT = '.xml'
Method Summary
void collectLogs (mixed $param)
string getConfigFile ()
void init (TXmlElement $config)
void setConfigFile (string $value)
Methods
collectLogs (line 120)

Collects log messages from a logger.

This method is an event handler to application's EndRequest event.

- access: public

void collectLogs (mixed $param)

- mixed $param: event parameter

getConfigFile (line 99)

- return: external configuration file. Defaults to null.
- access: public

string getConfigFile ()
init (line 57)

Initializes this module.

This method is required by the IModule interface.

- access: public
- throws: TConfigurationException if ConfigFile is invalid.

void init (TXmlElement $config)

- TXmlElement $config: configuration for this module, can be null

Redefinition of:

TModule::init()
  Initializes the module.

setConfigFile (line 109)

- access: public
- throws: TInvalidDataValueException if the file is invalid.

void setConfigFile (string $value)

- string $value: external configuration file in namespace format. The file must be suffixed with '.xml'.

#### Inherited Methods

Inherited From TModule

> TModule::getID()
> TModule::init()
> TModule::setID()

Inherited From TApplicationComponent

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

Inherited From TComponent

> TComponent::attachEventHandler()
> TComponent::canGetProperty()
> TComponent::canSetProperty()
> 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
CONFIG_FILE_EXT = '.xml' (line 41)

File extension of external configuration file

Documentation generated on Mon, 01 May 2006 23:04:07 -0400 by phpDocumentor 1.3.0RC4