CliFormatter.php
public function format(array $record)
    {
        $record = parent::format($record);
        $lines = [Logger::getLevelName($record['level']).' : '.$record['message']];
        if (!empty($record['context'])) {
            $lines += explode(PHP_EOL, trim(json_encode($record['context'], JSON_PRETTY_PRINT)));
        }
        $max = max(array_map('strlen', $lines));
        for ($i = 1; $i < count($lines); $i++) {
            $lines[$i] = self::TAB.str_pad($lines[$i], $max + 5);
        }
        $string = implode(PHP_EOL, $lines);
        $colors = $this->colors[$record['level']];
        if (is_array($colors)) {
            $pad = PHP_EOL.str_repeat(self::TAB.str_repeat(' ', $max + 5).PHP_EOL, 2);

            return "\n\033[{$colors[0]}m\033[{$colors[1]}m".$pad.$string.$pad."\033[0m";
        } else {
            return "\n\033[{$colors}m".$string."\033[0m";
        }
    }
public function format(array $record)
    {
        $record = parent::format($record);
        $lines = [Logger::getLevelName($record['level']).' : '.$record['message']];
        if (!empty($record['context'])) {
            $lines += explode(PHP_EOL, trim(json_encode($record['context'], JSON_PRETTY_PRINT)));
        }
        $max = max(array_map('strlen', $lines));
        for ($i = 1; $i < count($lines); $i++) {
            $lines[$i] = self::TAB.str_pad($lines[$i], $max + 5);
        }
        $string = implode(PHP_EOL, $lines);
        $colors = $this->colors[$record['level']];
        if (is_array($colors)) {
            $pad = PHP_EOL.str_repeat(self::TAB.str_repeat(' ', $max + 5).PHP_EOL, 2);

            return "\n\033[{$colors[0]}m\033[{$colors[1]}m".$pad.$string.$pad."\033[0m";
        } else {
            return "\n\033[{$colors}m".$string."\033[0m";
        }
    }
public function format ( array $ record ) { $ record = parent :: format ( $ record ) ; $ lines = [ Logger :: getLevelName ( $ record [ 'level' ] ) . ' : ' . $ record [ 'message' ] ] ; if ( ! empty ( $ record [ 'context' ] ) ) { $ lines += explode ( PHP_EOL , trim ( json_encode ( $ record [ 'context' ] , JSON_PRETTY_PRINT ) ) ) ; } $ max = max ( array_map ( 'strlen' , $ lines ) ) ; for ( $ i = 1 ; $ i < count ( $ lines ) ; $ i ++ ) { $ lines [ $ i ] = self :: TAB . str_pad ( $ lines [ $ i ] , $ max + 5 ) ; } $ string = implode ( PHP_EOL , $ lines ) ; $ colors = $ this -> colors [ $ record [ 'level' ] ] ; if ( is_array ( $ colors ) ) { $ pad = PHP_EOL . str_repeat ( self :: TAB . str_repeat ( ' ' , $ max + 5 ) . PHP_EOL , 2 ) ; return "\n\033[{$colors[0]}m\033[{$colors[1]}m" . $ pad . $ string . $ pad . "\033[0m" ; } else { return "\n\033[{$colors}m" . $ string . "\033[0m" ; } }
{@inheritdoc}
{