src/Debug/Logger.php
protected function getMeta($level, &$context)
    {
        $haveException = isset($context['exception']) &&
            ($context['exception'] instanceof \Exception
                || PHP_VERSION_ID >= 70000 && $context['exception'] instanceof \Throwable);
        $isError = \in_array($level, array('emergency','critical','error','warning','notice'));
        $metaVals = \array_intersect_key($context, \array_flip(array('file','line')));
        $metaVals['psr3level'] = $level;
        $context = \array_diff_key($context, $metaVals);
        if ($haveException) {
            $exception = $context['exception'];
            $metaVals = \array_merge(array(
                'backtrace' => $this->debug->errorHandler->backtrace($exception),
                'file' => $exception->getFile(),
                'line' => $exception->getLine(),
            ), $metaVals);
        } elseif ($isError && \count($metaVals) < 2) {
            $callerInfo = $this->debug->utilities->getCallerInfo(1);
            $metaVals = \array_merge(array(
                'file' => $callerInfo['file'],
                'line' => $callerInfo['line'],
            ), $metaVals);
        }
        if (!$context) {
            $context = $this->debug->meta();
        }
        return $this->debug->meta($metaVals);
    }
protected function getMeta($level, &$context)
    {
        $haveException = isset($context['exception']) &&
            ($context['exception'] instanceof \Exception
                || PHP_VERSION_ID >= 70000 && $context['exception'] instanceof \Throwable);
        $isError = \in_array($level, array('emergency','critical','error','warning','notice'));
        $metaVals = \array_intersect_key($context, \array_flip(array('file','line')));
        $metaVals['psr3level'] = $level;
        $context = \array_diff_key($context, $metaVals);
        if ($haveException) {
            $exception = $context['exception'];
            $metaVals = \array_merge(array(
                'backtrace' => $this->debug->errorHandler->backtrace($exception),
                'file' => $exception->getFile(),
                'line' => $exception->getLine(),
            ), $metaVals);
        } elseif ($isError && \count($metaVals) < 2) {
            $callerInfo = $this->debug->utilities->getCallerInfo(1);
            $metaVals = \array_merge(array(
                'file' => $callerInfo['file'],
                'line' => $callerInfo['line'],
            ), $metaVals);
        }
        if (!$context) {
            $context = $this->debug->meta();
        }
        return $this->debug->meta($metaVals);
    }
Exctract potential meta values from $context

@param string $level   log level
@param array  $context context array
meta values get removed

@return array meta