Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • Net
  • None
  • PHP
  • system
    • base
    • caching
      • dependencies
    • collections
    • console
    • db
      • ar
      • schema
        • cubrid
        • mssql
        • mysql
        • oci
        • pgsql
        • sqlite
    • i18n
      • gettext
    • logging
    • test
    • utils
    • validators
    • web
      • actions
      • auth
      • filters
      • form
      • helpers
      • renderers
      • services
      • widgets
        • captcha
        • pagers
  • Text
    • Highlighter
  • zii
    • behaviors
    • widgets
      • grid
      • jui

Classes

  • CChainedLogFilter
  • CDbLogRoute
  • CEmailLogRoute
  • CFileLogRoute
  • CLogFilter
  • CLogger
  • CLogRoute
  • CLogRouter
  • CProfileLogRoute
  • CSysLogRoute
  • CWebLogRoute

Interfaces

  • ILogFilter
  • Overview
  • Package
  • Class
  • Tree

Class CLogFilter

CLogFilter preprocesses the logged messages before they are handled by a log route.

CLogFilter is meant to be used by a log route to preprocess the logged messages before they are handled by the route. The default implementation of CLogFilter prepends additional context information to the logged messages. In particular, by setting CLogFilter::$logVars, predefined PHP variables such as $_SERVER, $_POST, etc. can be saved as a log message, which may help identify/debug issues encountered.

CComponent
Extended by CLogFilter implements ILogFilter
Package: system\logging
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Located at x2engine/framework/logging/CLogFilter.php
Methods summary
public array
# filter( array & $logs )

Filters the given log messages. This is the main method of CLogFilter. It processes the log messages by adding context information, etc.

Filters the given log messages. This is the main method of CLogFilter. It processes the log messages by adding context information, etc.

Parameters

$logs
array
$logs the log messages

Returns

array

Implementation of

ILogFilter::filter()
protected
# format( array & $logs )

Formats the log messages. The default implementation will prefix each message with session ID if CLogFilter::$prefixSession is set true. It may also prefix each message with the current user's name and ID if CLogFilter::$prefixUser is true.

Formats the log messages. The default implementation will prefix each message with session ID if CLogFilter::$prefixSession is set true. It may also prefix each message with the current user's name and ID if CLogFilter::$prefixUser is true.

Parameters

$logs
array
$logs the log messages
protected string
# getContext( )

Generates the context information to be logged. The default implementation will dump user information, system variables, etc.

Generates the context information to be logged. The default implementation will dump user information, system variables, etc.

Returns

string
the context information. If an empty string, it means no context information.
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Properties summary
public boolean $prefixSession false
#

whether to prefix each log message with the current user session ID. Defaults to false.

whether to prefix each log message with the current user session ID. Defaults to false.

public boolean $prefixUser false
#

whether to prefix each log message with the current user CWebUser::name name and CWebUser::id ID. Defaults to false.

whether to prefix each log message with the current user CWebUser::name name and CWebUser::id ID. Defaults to false.

public boolean $logUser true
#

whether to log the current user name and ID. Defaults to true.

whether to log the current user name and ID. Defaults to true.

public array $logVars array('_GET','_POST','_FILES','_COOKIE','_SESSION','_SERVER')
#

list of the PHP predefined variables that should be logged. Note that a variable must be accessible via $GLOBALS. Otherwise it won't be logged.

list of the PHP predefined variables that should be logged. Note that a variable must be accessible via $GLOBALS. Otherwise it won't be logged.

public callable $dumper 'var_export'
#

or function which will be used to dump context information. Defaults to var_export. If you're experiencing issues with circular references problem change it to print_r. Any kind of callable (static methods, user defined functions, lambdas, etc.) could also be used.

or function which will be used to dump context information. Defaults to var_export. If you're experiencing issues with circular references problem change it to print_r. Any kind of callable (static methods, user defined functions, lambdas, etc.) could also be used.

Since

1.1.14
API documentation generated by ApiGen 2.8.0