Craft\LogFilter » CLogFilter » CComponent

LogFilter pre-processes the logged messages before they are handled by a log route.

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

See also http://craftcms.com

View source

Public Properties

$dumpercallable – Or function which will be used to dump context information.
$logUserboolean – Whether to log the current user name and ID.
$logVarsarray – List of the PHP predefined variables that should be logged.
$prefixSessionboolean – Whether to prefix each log message with the current user session ID.
$prefixUserboolean – Whether to prefix each log message with the current user {@link CWebUser::name name} and {@link CWebUser::id ID}.

Public Methods

__call()Calls the named method which is not a class method.
__get()Returns a property value, an event handler list or a behavior based on its name.
__isset()Checks if a property value is null.
__set()Sets value of a component property.
__unset()Sets a component property to be null.
asa()Returns the named behavior object.
attachBehavior()Attaches a behavior to this component.
attachBehaviors()Attaches a list of behaviors to the component.
attachEventHandler()Attaches an event handler to an event.
canGetProperty()Determines whether a property can be read.
canSetProperty()Determines whether a property can be set.
detachBehavior()Detaches a behavior from the component.
detachBehaviors()Detaches all behaviors from the component.
detachEventHandler()Detaches an existing event handler.
disableBehavior()Disables an attached behavior.
disableBehaviors()Disables all behaviors attached to this component.
enableBehavior()Enables an attached behavior.
enableBehaviors()Enables all behaviors attached to this component.
evaluateExpression()Evaluates a PHP expression or callback under the context of this component.
filter()Filters the given log messages.
getEventHandlers()Returns the list of attached event handlers for an event.
hasEvent()Determines whether an event is defined.
hasEventHandler()Checks whether the named event has attached handlers.
hasProperty()Determines whether a property is defined.
raiseEvent()Raises an event.



public Craft\LogFilter __construct ( )

Protected Methods

format()Formats the log messages.
getContext()Generates the context information to be logged.