## 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,

       <route class="TFileLogRoute" Categories="System.Web.UI" Levels="Warning" />
       <route class="TEmailLogRoute" Categories="Application" Levels="Fatal" Emails="admin@pradosoft.com" />

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: $Id: TLogRouter.php 1398 2006-09-08 19:31:03Z xue $
- 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::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
CONFIG_FILE_EXT = '.xml' (line 41)

File extension of external configuration file

Documentation generated on Sun, 14 Jan 2007 21:43:25 -0500 by phpDocumentor 1.3.0RC4