protected function interpolate(array $variables = array())
    {
        $template = $this->logFormat;

        if (!isset($variables['context'])) {
            $variables['context'] = '';
        }
        $this->reverseJsonInContext($variables['context']);
        if (!$variables['context']) {
            $template = str_replace('%context%', '', $template);
            unset($variables['context']);
        }

        foreach ($variables as $key => $value) {
            if (strpos($template, '%'. $key .'%') === false) {
                continue;
            }
            $template = str_replace(
                '%' . $key . '%',
                $this->export($value),
                $template
            );
        }

        return $template;
    }
protected function interpolate(array $variables = array())
    {
        $template = $this->logFormat;

        if (!isset($variables['context'])) {
            $variables['context'] = '';
        }
        $this->reverseJsonInContext($variables['context']);
        if (!$variables['context']) {
            $template = str_replace('%context%', '', $template);
            unset($variables['context']);
        }

        foreach ($variables as $key => $value) {
            if (strpos($template, '%'. $key .'%') === false) {
                continue;
            }
            $template = str_replace(
                '%' . $key . '%',
                $this->export($value),
                $template
            );
        }

        return $template;
    }
protected function interpolate ( array $ variables = array ( ) ) { $ template = $ this -> logFormat ; if ( ! isset ( $ variables [ 'context' ] ) ) { $ variables [ 'context' ] = '' ; } $ this -> reverseJsonInContext ( $ variables [ 'context' ] ) ; if ( ! $ variables [ 'context' ] ) { $ template = str_replace ( '%context%' , '' , $ template ) ; unset ( $ variables [ 'context' ] ) ; } foreach ( $ variables as $ key => $ value ) { if ( strpos ( $ template , '%' . $ key . '%' ) === false ) { continue ; } $ template = str_replace ( '%' . $ key . '%' , $ this -> export ( $ value ) , $ template ) ; } return $ template ; }
Interpolates log variables into the defined log format.

@param  array $variables The log variables.
@return string
Interpolates log variables into the defined log format .