Class yii\mongodb\LogBuilder

Inheritanceyii\mongodb\LogBuilder » yii\base\BaseObject
Available since version2.1
Source Code https://github.com/yiisoft/yii2-mongodb/blob/master/src/LogBuilder.php

LogBuilder allows composition and escaping of the log entries.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
encodeData() Encodes complex log data into JSON format string. yii\mongodb\LogBuilder
generateToken() Generate log/profile token. yii\mongodb\LogBuilder

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
processData() Pre-processes the log data before sending it to json_encode(). yii\mongodb\LogBuilder

Method Details

encodeData() public method

Encodes complex log data into JSON format string.

public string encodeData ( $data )
$data mixed

Raw data.

return string

Encoded data string.

generateToken() public method

Generate log/profile token.

public string generateToken ( $namespace, $data = [] )
$namespace string|array

Command namespace

$data array

Command data.

return string

Token.

processData() protected method

Pre-processes the log data before sending it to json_encode().

protected mixed processData ( $data )
$data mixed

Raw data.

return mixed

The processed data.