src/Driver.php
public static function logs($id = null)
    {
        $logs = array();
        $ids = (is_null($id)) ? array_keys(static::$logs) : array($id);
        foreach ($ids as $key) {
            if (isset(static::$logs[$key])) {
                $logs[$key] = array(
                    'driver' => (isset(static::$drivers[$key])) ? static::$drivers[$key] : null,
                    'duration' => 0,
                    'queries' => array(),
                );
                foreach (static::$logs[$key] as $log) { // 'sql', 'count', 'errors'?, 'duration'
                    $log['duration'] = $log['prepared'] + $log['executed'];
                    unset($log['prepared'], $log['executed']);
                    if (isset($log['errors'])) {
                        $log['errors'] = array_count_values($log['errors']);
                    }
                    $logs[$key]['duration'] += $log['duration'];
                    $logs[$key]['queries'][] = $log;
                }
            }
        }

        return (is_null($id)) ? $logs : array_shift($logs);
    }
public static function logs($id = null)
    {
        $logs = array();
        $ids = (is_null($id)) ? array_keys(static::$logs) : array($id);
        foreach ($ids as $key) {
            if (isset(static::$logs[$key])) {
                $logs[$key] = array(
                    'driver' => (isset(static::$drivers[$key])) ? static::$drivers[$key] : null,
                    'duration' => 0,
                    'queries' => array(),
                );
                foreach (static::$logs[$key] as $log) { // 'sql', 'count', 'errors'?, 'duration'
                    $log['duration'] = $log['prepared'] + $log['executed'];
                    unset($log['prepared'], $log['executed']);
                    if (isset($log['errors'])) {
                        $log['errors'] = array_count_values($log['errors']);
                    }
                    $logs[$key]['duration'] += $log['duration'];
                    $logs[$key]['queries'][] = $log;
                }
            }
        }

        return (is_null($id)) ? $logs : array_shift($logs);
    }
@param int $id To only return the data for a specific database connection.

@return array Debug, error, and profile data for all of your database queries.