public static function formatLogEntry( array $entry, $newline = true )
    {
        $_level = Option::get( $entry, 'level' );
        $_levelName = static::_getLogLevel( $_level );
        $_timestamp = Option::get( $entry, 'timestamp' );
        $_message = preg_replace( '/\033\[[\d;]+m/', null, Option::get( $entry, 'message' ) );
        $_context = Option::get( $entry, 'context' );
        $_extra = Option::get( $entry, 'extra' );

        $_blob = new \stdClass();

        if ( static::$_includeProcessInfo )
        {
            $_blob->pid = getmypid();
            $_blob->uid = getmyuid();
            $_blob->hostname = gethostname();
        }

        if ( !empty( $_context ) )
        {
            $_blob->context = $_context;
        }

        if ( !empty( $_extra ) )
        {
            $_context->extra = $_extra;
        }

        $_blob = json_encode( $_blob );

        if ( false === $_blob || '{}' == $_blob )
        {
            $_blob = null;
        }

        $_replacements = array(
            0 => $_levelName,
            1 => date( 'M d', $_timestamp ),
            2 => date( 'H:i:s', $_timestamp ),
            3 => $_message,
            4 => $_blob,
        );

        return str_ireplace(
            array(
                '%%level%%',
                '%%date%%',
                '%%time%%',
                '%%message%%',
                '%%extra%%',
            ),
            $_replacements,
            static::$_logFormat
        ) . ( $newline ? PHP_EOL : null );
    }
public static function formatLogEntry( array $entry, $newline = true )
    {
        $_level = Option::get( $entry, 'level' );
        $_levelName = static::_getLogLevel( $_level );
        $_timestamp = Option::get( $entry, 'timestamp' );
        $_message = preg_replace( '/\033\[[\d;]+m/', null, Option::get( $entry, 'message' ) );
        $_context = Option::get( $entry, 'context' );
        $_extra = Option::get( $entry, 'extra' );

        $_blob = new \stdClass();

        if ( static::$_includeProcessInfo )
        {
            $_blob->pid = getmypid();
            $_blob->uid = getmyuid();
            $_blob->hostname = gethostname();
        }

        if ( !empty( $_context ) )
        {
            $_blob->context = $_context;
        }

        if ( !empty( $_extra ) )
        {
            $_context->extra = $_extra;
        }

        $_blob = json_encode( $_blob );

        if ( false === $_blob || '{}' == $_blob )
        {
            $_blob = null;
        }

        $_replacements = array(
            0 => $_levelName,
            1 => date( 'M d', $_timestamp ),
            2 => date( 'H:i:s', $_timestamp ),
            3 => $_message,
            4 => $_blob,
        );

        return str_ireplace(
            array(
                '%%level%%',
                '%%date%%',
                '%%time%%',
                '%%message%%',
                '%%extra%%',
            ),
            $_replacements,
            static::$_logFormat
        ) . ( $newline ? PHP_EOL : null );
    }
public static function formatLogEntry ( array $ entry , $ newline = true ) { $ _level = Option :: get ( $ entry , 'level' ) ; $ _levelName = static :: _getLogLevel ( $ _level ) ; $ _timestamp = Option :: get ( $ entry , 'timestamp' ) ; $ _message = preg_replace ( '/\033\[[\d;]+m/' , null , Option :: get ( $ entry , 'message' ) ) ; $ _context = Option :: get ( $ entry , 'context' ) ; $ _extra = Option :: get ( $ entry , 'extra' ) ; $ _blob = new \ stdClass ( ) ; if ( static :: $ _includeProcessInfo ) { $ _blob -> pid = getmypid ( ) ; $ _blob -> uid = getmyuid ( ) ; $ _blob -> hostname = gethostname ( ) ; } if ( ! empty ( $ _context ) ) { $ _blob -> context = $ _context ; } if ( ! empty ( $ _extra ) ) { $ _context -> extra = $ _extra ; } $ _blob = json_encode ( $ _blob ) ; if ( false === $ _blob || '{}' == $ _blob ) { $ _blob = null ; } $ _replacements = array ( 0 => $ _levelName , 1 => date ( 'M d' , $ _timestamp ) , 2 => date ( 'H:i:s' , $ _timestamp ) , 3 => $ _message , 4 => $ _blob , ) ; return str_ireplace ( array ( '%%level%%' , '%%date%%' , '%%time%%' , '%%message%%' , '%%extra%%' , ) , $ _replacements , static :: $ _logFormat ) . ( $ newline ? PHP_EOL : null ) ; }
Formats the log entry. You can override this method to provide you own formatting.
It will strip out any console escape sequences as well

@param array $entry Read the code, data in the array
@param bool  $newline

@return string
@deprecated in v0.2.20. To be removed in v0.3.0. Replaced by Monolog formatter
Formats the log entry . You can override this method to provide you own formatting . It will strip out any console escape sequences as well