public function debug($type = null)
    {
        if (!$type) {
            return self::$_log;
        }

        return ($type == 'error' ? self::$_log['error'] : self::$_log['query']);
    }
public function debug($type = null)
    {
        if (!$type) {
            return self::$_log;
        }

        return ($type == 'error' ? self::$_log['error'] : self::$_log['query']);
    }
public function debug ( $ type = null ) { if ( ! $ type ) { return self :: $ _log ; } return ( $ type == 'error' ? self :: $ _log [ 'error' ] : self :: $ _log [ 'query' ] ) ; }
Returns all the log entries by type. There are two valid types,
error and debug. If no type is given, the entire log is returned,
otherwise only log messages for that type are returned

@param null|string $type
@return array
An array of associative array's. Log entries of the error type
return the query the error occurred on and the error number and
message from MySQL. Log entries of the debug type return the
the query and the start/stop time to indicate how long it took
to run
Returns all the log entries by type . There are two valid types error and debug . If no type is given the entire log is returned otherwise only log messages for that type are returned