src/Library/Logger.php
protected function getLogRecord($record)
    {
        $prefix = $suffix = array();

        // first infos
        $date = $record['datetime']->format( $this->datetime_format );
        $prefix[] = '['.$date.']';
        if (!empty($record['ip']))
            $prefix[] = '[ip '.$record['ip'].']';
        if (!empty($record['pid']))
            $prefix[] = '[pid '.$record['pid'].']';
        $prefix[] = $record['level_name'].' :';

        // last infos
        if (!empty($record['context'])) {
            $suffix[] = '['.$this->writeArray($record['context']).']';
        }
        if (!empty($record['extra'])) {
            $suffix[] = '['.$this->writeArray($record['extra']).']';
        }

        return join(' ', $prefix).' '.preg_replace("/\n*$/", ' ', $record['message']).' '.join(' ', $suffix);
    }
protected function getLogRecord($record)
    {
        $prefix = $suffix = array();

        // first infos
        $date = $record['datetime']->format( $this->datetime_format );
        $prefix[] = '['.$date.']';
        if (!empty($record['ip']))
            $prefix[] = '[ip '.$record['ip'].']';
        if (!empty($record['pid']))
            $prefix[] = '[pid '.$record['pid'].']';
        $prefix[] = $record['level_name'].' :';

        // last infos
        if (!empty($record['context'])) {
            $suffix[] = '['.$this->writeArray($record['context']).']';
        }
        if (!empty($record['extra'])) {
            $suffix[] = '['.$this->writeArray($record['extra']).']';
        }

        return join(' ', $prefix).' '.preg_replace("/\n*$/", ' ', $record['message']).' '.join(' ', $suffix);
    }
protected function getLogRecord ( $ record ) { $ prefix = $ suffix = array ( ) ; // first infos $ date = $ record [ 'datetime' ] -> format ( $ this -> datetime_format ) ; $ prefix [ ] = '[' . $ date . ']' ; if ( ! empty ( $ record [ 'ip' ] ) ) $ prefix [ ] = '[ip ' . $ record [ 'ip' ] . ']' ; if ( ! empty ( $ record [ 'pid' ] ) ) $ prefix [ ] = '[pid ' . $ record [ 'pid' ] . ']' ; $ prefix [ ] = $ record [ 'level_name' ] . ' :' ; // last infos if ( ! empty ( $ record [ 'context' ] ) ) { $ suffix [ ] = '[' . $ this -> writeArray ( $ record [ 'context' ] ) . ']' ; } if ( ! empty ( $ record [ 'extra' ] ) ) { $ suffix [ ] = '[' . $ this -> writeArray ( $ record [ 'extra' ] ) . ']' ; } return join ( ' ' , $ prefix ) . ' ' . preg_replace ( "/\n*$/" , ' ' , $ record [ 'message' ] ) . ' ' . join ( ' ' , $ suffix ) ; }
Build a log line from a complex array

@param   array   $record An array built by the "addRecord()" method
@return  string  The line formated and ready to be written
@see     self::addRecord()
Build a log line from a complex array