yii\debug\LogTarget::collect PHP Method

collect() public method

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 collect ( array $messages, boolean $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
    public function collect($messages, $final)
    {
        $this->messages = array_merge($this->messages, $messages);
        if ($final) {
            $this->export();
        }
    }