convertToString example


    public function format(array $record)
    {
        $output = $this->addTitle($record['level_name']$record['level']);
        $output .= '<table cellspacing="1" width="100%">';

        $output .= $this->addRow('Message', (string) $record['message']);
        $output .= $this->addRow('Time', $record['datetime']->format('Y-m-d\TH:i:s.uO'));
        $output .= $this->addRow('Channel', $record['channel']);
        if ($record['context']) {
            $output .= $this->addRow('Context', $this->convertToString($record['context']));
        }
        if ($record['extra']) {
            if (\is_array($record['extra'])) {
                foreach ($record['extra'] as $key => $row) {
                    $output .= $this->addRow($key$this->convertToString($row));
                }
            } else {
                $output .= $this->addRow('Extra', $this->convertToString($record['extra']));
            }
        }

        
Home | Imprint | This part of the site doesn't use cookies.