PRADO Component Framework for PHP 5
  • Home
  • About
  • Testimonials
  • Demos
  • Download
  • Documentation
  • Forum
  • Development
  • Tutorials
  • Class Docs
  • API Manual
  • Wiki

Packages

  • None
  • System
    • Caching
    • Collections
    • Data
      • ActiveRecord
        • Relations
        • Scaffold
          • InputBuilder
      • Commom
        • Sqlite
      • Common
        • Mssql
        • Mysql
        • Oracle
        • Pgsql
        • Sqlite
      • DataGateway
      • SqlMap
        • Configuration
        • Statements
    • Exceptions
    • I18N
    • IO
    • Security
    • Util
    • Web
      • Javascripts
      • Services
      • UI
        • ActiveControls
        • WebControls
    • Xml
  • Wsat
    • pages
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class TLogRouter

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 setConfigFile 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" />

PHP configuration style:


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

TComponent
Extended by TApplicationComponent
Extended by TModule implements IModule
Extended by TLogRouter
Package: System\Util
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Author: Carl G. Mathisen <carlgmathisen@gmail.com>
Since: 3.0
Located at Util/TLogRouter.php
Methods summary
public
# init( mixed $config )

Initializes this module. This method is required by the IModule interface.

Initializes this module. This method is required by the IModule interface.

Parameters

$config
mixed
configuration for this module, can be null

Throws

TConfigurationException
if getConfigFile ConfigFile is invalid.

Overrides

TModule::init()
public
# addRoute( TLogRoute $route )

Adds a TLogRoute instance to the log router.

Adds a TLogRoute instance to the log router.

Parameters

$route
TLogRoute
$route

Throws

TInvalidDataTypeException
if the route object is invalid
public string
# getConfigFile( )

Returns

string
external configuration file. Defaults to null.
public
# setConfigFile( string $value )

Parameters

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

Throws

TConfigurationException
if the file is invalid.
public
# collectLogs( mixed $param )

Collects log messages from a logger. This method is an event handler to application's EndRequest event.

Collects log messages from a logger. This method is an event handler to application's EndRequest event.

Parameters

$param
mixed
event parameter
Methods inherited from TModule
getID(), setID()
Methods inherited from TApplicationComponent
getApplication(), getRequest(), getResponse(), getService(), getSession(), getUser(), publishAsset(), publishFilePath()
Methods inherited from TComponent
__call(), __construct(), __destruct(), __get(), __isset(), __set(), __sleep(), __unset(), __wakeup(), addParsedObject(), asa(), attachBehavior(), attachBehaviors(), attachClassBehavior(), attachEventHandler(), canGetProperty(), canSetProperty(), clearBehaviors(), createdOnTemplate(), detachBehavior(), detachBehaviors(), detachClassBehavior(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), evaluateStatements(), fxAttachClassBehavior(), fxDetachClassBehavior(), getAutoGlobalListen(), getBehaviorsEnabled(), getClassHierarchy(), getEventHandlers(), getListeningToGlobalEvents(), getSubProperty(), hasEvent(), hasEventHandler(), hasProperty(), isa(), listen(), raiseEvent(), setSubProperty(), unlisten()
Constants inherited from TComponent
GLOBAL_RAISE_EVENT_LISTENER
Terms of Service | Contact Us
PRADO v3.2.4 API Manual API documentation generated by ApiGen 2.8.0
Copyright © 2006-2014 by the PRADO Group.
Powered by PRADO