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
- CLogFilter implements ILogFilter
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
public
array
|
|
protected
|
#
format( array & $logs )
Formats the log messages. The default implementation will prefix each message
with session ID if |
protected
string
|
#
getContext( )
Generates the context information to be logged. The default implementation will dump user information, system variables, etc. |
public
boolean
|
$prefixSession | 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. |
public
boolean
|
$logUser | 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. |
public
callable
|
$dumper | 'var_export' |
#
or function which will be used to dump context information. Defaults to
|