Pimcore\Log\ApplicationLogger::handleLog PHP Method

handleLog() protected method

protected handleLog ( $level, $message, $params )
    protected function handleLog($level, $message, $params)
    {
        $context = [];
        if (isset($params[1])) {
            if (is_array($params[1])) {
                // standard PSR-3 -> $context is an array
                $context = $params[1];
            } elseif ($params[1] instanceof \Pimcore\Model\Element\ElementInterface) {
                $context["relatedObject"] = $params[1];
            }
        }
        if (isset($params[2])) {
            if ($params[2] instanceof \Pimcore\Log\FileObject) {
                $context["fileObject"] = $params[2];
            }
        }
        if (isset($params[3])) {
            if (is_string($params[3])) {
                $context["component"] = $params[3];
            }
        }
        $this->log($level, $message, $context);
    }