src/Log/StreamHandler.php
public static function format(array $record)
    {
        $seconds = (int) $record['time'];
        $millis = floor(($record['time'] - $seconds) * 1000);
        $timestamp = date('Y-m-d H:i:s', $seconds);
        $timestamp .= sprintf('.%03d ', $millis);
        $timestamp .= date('P');
        $level = '[' . $record['level'] . ']';
        $message = '';
        $message .= Logger::interpolate($record['message'], $record['context']);
        if (isset($record['context']['file'])) {
            $message .= ' in ' . $record['context']['file'];
        }
        if (isset($record['context']['line'])) {
            $message .= ' on line ' . $record['context']['line'];
        }
        return $timestamp . ' ' . $level . ' ' . $message . PHP_EOL;
    }
public static function format(array $record)
    {
        $seconds = (int) $record['time'];
        $millis = floor(($record['time'] - $seconds) * 1000);
        $timestamp = date('Y-m-d H:i:s', $seconds);
        $timestamp .= sprintf('.%03d ', $millis);
        $timestamp .= date('P');
        $level = '[' . $record['level'] . ']';
        $message = '';
        $message .= Logger::interpolate($record['message'], $record['context']);
        if (isset($record['context']['file'])) {
            $message .= ' in ' . $record['context']['file'];
        }
        if (isset($record['context']['line'])) {
            $message .= ' on line ' . $record['context']['line'];
        }
        return $timestamp . ' ' . $level . ' ' . $message . PHP_EOL;
    }
public static function format ( array $ record ) { $ seconds = ( int ) $ record [ 'time' ] ; $ millis = floor ( ( $ record [ 'time' ] - $ seconds ) * 1000 ) ; $ timestamp = date ( 'Y-m-d H:i:s' , $ seconds ) ; $ timestamp .= sprintf ( '.%03d ' , $ millis ) ; $ timestamp .= date ( 'P' ) ; $ level = '[' . $ record [ 'level' ] . ']' ; $ message = '' ; $ message .= Logger :: interpolate ( $ record [ 'message' ] , $ record [ 'context' ] ) ; if ( isset ( $ record [ 'context' ] [ 'file' ] ) ) { $ message .= ' in ' . $ record [ 'context' ] [ 'file' ] ; } if ( isset ( $ record [ 'context' ] [ 'line' ] ) ) { $ message .= ' on line ' . $ record [ 'context' ] [ 'line' ] ; } return $ timestamp . ' ' . $ level . ' ' . $ message . PHP_EOL ; }
Format a log message for a log file.

@param array $record
Log message array.
@return string Formatted log message followed by a line break.
Format a log message for a log file .