protected function formatLog($level, $message, $context = array())
    {
        // Format message and content
        $params = $this->formatParams($message, $context);
        $message = $params['message'];
        $context = $params['context'];

        // Format log content
        $content = str_replace(array(
            '%datetime%', '%namespace%', '%level%', '%message%',
        ), array(
            date($this->dateFormat, microtime(true)),
            $this->namespace,
            strtoupper($level),
            $message,
        ), $this->format);

        // Format extra context
        if ($this->context || $context) {
            $content .= print_r($this->context + $context, true) . "\n";
        }

        return $content;
    }
protected function formatLog($level, $message, $context = array())
    {
        // Format message and content
        $params = $this->formatParams($message, $context);
        $message = $params['message'];
        $context = $params['context'];

        // Format log content
        $content = str_replace(array(
            '%datetime%', '%namespace%', '%level%', '%message%',
        ), array(
            date($this->dateFormat, microtime(true)),
            $this->namespace,
            strtoupper($level),
            $message,
        ), $this->format);

        // Format extra context
        if ($this->context || $context) {
            $content .= print_r($this->context + $context, true) . "\n";
        }

        return $content;
    }
protected function formatLog ( $ level , $ message , $ context = array ( ) ) { // Format message and content $ params = $ this -> formatParams ( $ message , $ context ) ; $ message = $ params [ 'message' ] ; $ context = $ params [ 'context' ] ; // Format log content $ content = str_replace ( array ( '%datetime%' , '%namespace%' , '%level%' , '%message%' , ) , array ( date ( $ this -> dateFormat , microtime ( true ) ) , $ this -> namespace , strtoupper ( $ level ) , $ message , ) , $ this -> format ) ; // Format extra context if ( $ this -> context || $ context ) { $ content .= print_r ( $ this -> context + $ context , true ) . "\n" ; } return $ content ; }
Format the log content

@param string $level
@param string $message
@param array $context
@return string
Format the log content