## 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 2415 2008-03-24 20:39:47Z xue $
- author: Qiang Xue <qiang.xue@gmail.com>

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

    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 122)

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 101)

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

string getConfigFile ()
init (line 59)

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 111)

- 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 43)

File extension of external configuration file

Documentation generated on Mon, 21 Apr 2008 11:35:34 -0400 by phpDocumentor 1.3.0RC4