src/Viserio/Component/Log/DataCollector/LoggerDataCollector.php
private function groupLogLevels(): array
    {
        $deprecationLogs  = [];
        $debugLogs        = [];
        $infoAndErrorLogs = [];
        $silencedLogs     = [];

        $formatLog = function ($log) {
            return[
                $log['priorityName'] . '<br>' . '<div class="text-muted">' . \date('H:i:s', $log['timestamp']) . '</div>',
                $log['channel'],
                $log['message'] . '<br>' . (\count($log['context']) !== 0 ? $this->cloneVar($log['context']) : ''),
            ];
        };

        foreach ((array) $this->data['logs'] as $log) {
            if (isset($log['priority'])) {
                if (\in_array($log['priority'], [Logger::ERROR, Logger::INFO], true)) {
                    $infoAndErrorLogs[] = $formatLog($log);
                } elseif ($log['priority'] === Logger::DEBUG) {
                    $debugLogs[] = $formatLog($log);
                }
            } elseif ($this->isSilencedOrDeprecationErrorLog($log)) {
                if (isset($log['context']) && $log['context']['exception'] instanceof SilencedErrorContext) {
                    $silencedLogs[] = $formatLog($log);
                } else {
                    $deprecationLogs[] = $formatLog($log);
                }
            }
        }

        return [
            'deprecation' => $deprecationLogs,
            'debug'       => $debugLogs,
            'info_error'  => $infoAndErrorLogs,
            'silenced'    => $silencedLogs,
        ];
    }
private function groupLogLevels(): array
    {
        $deprecationLogs  = [];
        $debugLogs        = [];
        $infoAndErrorLogs = [];
        $silencedLogs     = [];

        $formatLog = function ($log) {
            return[
                $log['priorityName'] . '<br>' . '<div class="text-muted">' . \date('H:i:s', $log['timestamp']) . '</div>',
                $log['channel'],
                $log['message'] . '<br>' . (\count($log['context']) !== 0 ? $this->cloneVar($log['context']) : ''),
            ];
        };

        foreach ((array) $this->data['logs'] as $log) {
            if (isset($log['priority'])) {
                if (\in_array($log['priority'], [Logger::ERROR, Logger::INFO], true)) {
                    $infoAndErrorLogs[] = $formatLog($log);
                } elseif ($log['priority'] === Logger::DEBUG) {
                    $debugLogs[] = $formatLog($log);
                }
            } elseif ($this->isSilencedOrDeprecationErrorLog($log)) {
                if (isset($log['context']) && $log['context']['exception'] instanceof SilencedErrorContext) {
                    $silencedLogs[] = $formatLog($log);
                } else {
                    $deprecationLogs[] = $formatLog($log);
                }
            }
        }

        return [
            'deprecation' => $deprecationLogs,
            'debug'       => $debugLogs,
            'info_error'  => $infoAndErrorLogs,
            'silenced'    => $silencedLogs,
        ];
    }
Group log level together.

@return array