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,

  1.    <route class="TFileLogRoute" Categories="System.Web.UI" Levels="Warning" />
  2.    <route class="TEmailLogRoute" Categories="Application" Levels="Fatal" Emails="admin@pradosoft.com" />
PHP configuration style:
    You can specify multiple routes with different filtering conditions and different targets, even if the routes are of the same type.

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

    TComponent
       |
       --TApplicationComponent
          |
          --TModule
             |
             --TLogRouter
    Method Summary
    void addRoute (TLogRoute $route)
    void collectLogs (mixed $param)
    string getConfigFile ()
    void init (mixed $config)
    void setConfigFile (string $value)
    Methods
    addRoute (line 135)

    Adds a TLogRoute instance to the log router.

    • throws: TInvalidDataTypeException if the route object is invalid
    • access: public
    void addRoute (TLogRoute $route)
    collectLogs (line 167)

    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 146)
    • return: external configuration file. Defaults to null.
    • access: public
    string getConfigFile ()
    init (line 60)

    Initializes this module.

    This method is required by the IModule interface.

    • throws: TConfigurationException if ConfigFile is invalid.
    • access: public
    void init (mixed $config)
    • mixed $config: configuration for this module, can be null

    Redefinition of:
    TModule::init()
    Initializes the module.
    setConfigFile (line 156)
    • throws: TConfigurationException if the file is invalid.
    • access: public
    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::__call()
    TComponent::__get()
    TComponent::__set()
    TComponent::__sleep()
    TComponent::__wakeup()

    Documentation generated on Mon, 25 Jun 2012 14:38:41 +0200 by phpDocumentor 1.4.3