Log.php
function _format($format, $timestamp, $priority, $message)
    {
        /*
         * If the format string references any of the backtrace-driven
         * variables (%5 %6,%7,%8), generate the backtrace and fetch them.
         */
        if (preg_match('/%[5678]/', $format)) {
            /* Plus 2 to account for our internal function calls. */
            $d = $this->_backtrace_depth + 2;
            list($file, $line, $func, $class) = $this->_getBacktraceVars($d);
        }

        /*
         * Build the formatted string.  We use the sprintf() function's
         * "argument swapping" capability to dynamically select and position
         * the variables which will ultimately appear in the log string.
         */
        return sprintf($format,
                       $timestamp,
                       $this->_ident,
                       $this->priorityToString($priority),
                       $message,
                       isset($file) ? $file : '',
                       isset($line) ? $line : '',
                       isset($func) ? $func : '',
                       isset($class) ? $class : '');
    }
function _format($format, $timestamp, $priority, $message)
    {
        /*
         * If the format string references any of the backtrace-driven
         * variables (%5 %6,%7,%8), generate the backtrace and fetch them.
         */
        if (preg_match('/%[5678]/', $format)) {
            /* Plus 2 to account for our internal function calls. */
            $d = $this->_backtrace_depth + 2;
            list($file, $line, $func, $class) = $this->_getBacktraceVars($d);
        }

        /*
         * Build the formatted string.  We use the sprintf() function's
         * "argument swapping" capability to dynamically select and position
         * the variables which will ultimately appear in the log string.
         */
        return sprintf($format,
                       $timestamp,
                       $this->_ident,
                       $this->priorityToString($priority),
                       $message,
                       isset($file) ? $file : '',
                       isset($line) ? $line : '',
                       isset($func) ? $func : '',
                       isset($class) ? $class : '');
    }
function _format ( $ format , $ timestamp , $ priority , $ message ) { /*
         * If the format string references any of the backtrace-driven
         * variables (%5 %6,%7,%8), generate the backtrace and fetch them.
         */ if ( preg_match ( '/%[5678]/' , $ format ) ) { /* Plus 2 to account for our internal function calls. */ $ d = $ this -> _backtrace_depth + 2 ; list ( $ file , $ line , $ func , $ class ) = $ this -> _getBacktraceVars ( $ d ) ; } /*
         * Build the formatted string.  We use the sprintf() function's
         * "argument swapping" capability to dynamically select and position
         * the variables which will ultimately appear in the log string.
         */ return sprintf ( $ format , $ timestamp , $ this -> _ident , $ this -> priorityToString ( $ priority ) , $ message , isset ( $ file ) ? $ file : '' , isset ( $ line ) ? $ line : '' , isset ( $ func ) ? $ func : '' , isset ( $ class ) ? $ class : '' ) ; }
Produces a formatted log line based on a format string and a set of
variables representing the current log record and state.

@return  string  Formatted log string.

@access  protected
@since   Log 1.9.4
Produces a formatted log line based on a format string and a set of variables representing the current log record and state .