Class yii\debug\LogTarget

Inheritanceyii\debug\LogTarget » yii\log\Target
Available since version2.0

The debug LogTarget is used to store logs for later use in the debugger tool

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() yii\debug\LogTarget
collect() Processes the given log messages. yii\debug\LogTarget
export() Exports log messages to a specific destination. yii\debug\LogTarget

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
collectSummary() Collects summary data of current request. yii\debug\LogTarget
gc() Removes obsolete data files yii\debug\LogTarget
getSqlTotalCount() Returns total sql count executed in current request. If database panel is not configured returns 0. yii\debug\LogTarget

Property Details

$module public property
public yii\debug\Module $module null
$tag public property
public string $tag null

Method Details

__construct() public method

public void __construct ( $module, $config = [] )
$module yii\debug\Module
$config array
collect() public method

Processes the given log messages.

This method will filter the given messages with levels and categories. And if requested, it will also export the filtering result to specific medium (e.g. email).

public void collect ( $messages, $final )
$messages array

Log messages to be processed. See \yii\log\Logger::messages for the structure of each message.

$final boolean

Whether this method is called at the end of the current application

throws \yii\base\Exception
collectSummary() protected method

Collects summary data of current request.

protected array collectSummary ( )
export() public method

Exports log messages to a specific destination.

Child classes must implement this method.

public void export ( )
throws \yii\base\Exception
gc() protected method

Removes obsolete data files

protected void gc ( &$manifest )
$manifest array
getSqlTotalCount() protected method

Returns total sql count executed in current request. If database panel is not configured returns 0.

protected integer getSqlTotalCount ( )