public function logQuery($connection, $query, array $bindings, $time)
    {
        if (! empty($bindings)) {
            $query = vsprintf(
                // Replace pdo bindings to printf string bindings escaping % char.
                str_replace(['%', '?'], ['%%', "'%s'"], $query),

                // Convert all query attributes to strings.
                $this->normalizeQueryAttributes($bindings)
            );
        }

        // Finish query with semicolon.
        $query = rtrim($query, ';') . ';';

        $this->queries[] = compact('connection', 'query', 'time');
    }
public function logQuery($connection, $query, array $bindings, $time)
    {
        if (! empty($bindings)) {
            $query = vsprintf(
                // Replace pdo bindings to printf string bindings escaping % char.
                str_replace(['%', '?'], ['%%', "'%s'"], $query),

                // Convert all query attributes to strings.
                $this->normalizeQueryAttributes($bindings)
            );
        }

        // Finish query with semicolon.
        $query = rtrim($query, ';') . ';';

        $this->queries[] = compact('connection', 'query', 'time');
    }
public function logQuery ( $ connection , $ query , array $ bindings , $ time ) { if ( ! empty ( $ bindings ) ) { $ query = vsprintf ( // Replace pdo bindings to printf string bindings escaping % char. str_replace ( [ '%' , '?' ] , [ '%%' , "'%s'" ] , $ query ) , // Convert all query attributes to strings. $ this -> normalizeQueryAttributes ( $ bindings ) ) ; } // Finish query with semicolon. $ query = rtrim ( $ query , ';' ) . ';' ; $ this -> queries [ ] = compact ( 'connection' , 'query' , 'time' ) ; }
Log DB query.

@param string $connection
@param string $query
@param array $bindings
@param float $time
Log DB query .