public function batchGetLogs(BatchGetLogsRequest $request)
    {
        $params  = array();
        $headers = array();

        $project  = $request->getProject() ?: '';
        $logStore = $request->getLogStore() ?: '';
        $shardId  = ! is_null($request->getShardId()) ? $request->getShardId() : '';

        if ( ! is_null($request->getCount())) {
            $params['count'] = $request->getCount();
        }

        if ( ! is_null($request->getCursor())) {
            $params['cursor'] = $request->getCursor();
        }

        $params['type']             = 'log';
        $headers['Accept-Encoding'] = 'gzip';
        $headers['accept']          = 'application/x-protobuf';
        $resource                   = "/logstores/$logStore/shards/$shardId";

        list( $resp, $header ) = $this->send("GET", $project, null, $resource, $params, $headers);
        //$resp is a byteArray
        $resp = gzuncompress($resp);

        if ($resp === false) {
            $resp = new LogGroupList();
        } else {
            $resp = new LogGroupList($resp);
        }

        return new BatchGetLogsResponse($resp, $header);
    }
public function batchGetLogs(BatchGetLogsRequest $request)
    {
        $params  = array();
        $headers = array();

        $project  = $request->getProject() ?: '';
        $logStore = $request->getLogStore() ?: '';
        $shardId  = ! is_null($request->getShardId()) ? $request->getShardId() : '';

        if ( ! is_null($request->getCount())) {
            $params['count'] = $request->getCount();
        }

        if ( ! is_null($request->getCursor())) {
            $params['cursor'] = $request->getCursor();
        }

        $params['type']             = 'log';
        $headers['Accept-Encoding'] = 'gzip';
        $headers['accept']          = 'application/x-protobuf';
        $resource                   = "/logstores/$logStore/shards/$shardId";

        list( $resp, $header ) = $this->send("GET", $project, null, $resource, $params, $headers);
        //$resp is a byteArray
        $resp = gzuncompress($resp);

        if ($resp === false) {
            $resp = new LogGroupList();
        } else {
            $resp = new LogGroupList($resp);
        }

        return new BatchGetLogsResponse($resp, $header);
    }
public function batchGetLogs ( BatchGetLogsRequest $ request ) { $ params = array ( ) ; $ headers = array ( ) ; $ project = $ request -> getProject ( ) ? : '' ; $ logStore = $ request -> getLogStore ( ) ? : '' ; $ shardId = ! is_null ( $ request -> getShardId ( ) ) ? $ request -> getShardId ( ) : '' ; if ( ! is_null ( $ request -> getCount ( ) ) ) { $ params [ 'count' ] = $ request -> getCount ( ) ; } if ( ! is_null ( $ request -> getCursor ( ) ) ) { $ params [ 'cursor' ] = $ request -> getCursor ( ) ; } $ params [ 'type' ] = 'log' ; $ headers [ 'Accept-Encoding' ] = 'gzip' ; $ headers [ 'accept' ] = 'application/x-protobuf' ; $ resource = "/logstores/$logStore/shards/$shardId" ; list ( $ resp , $ header ) = $ this -> send ( "GET" , $ project , null , $ resource , $ params , $ headers ) ; //$resp is a byteArray $ resp = gzuncompress ( $ resp ) ; if ( $ resp === false ) { $ resp = new LogGroupList ( ) ; } else { $ resp = new LogGroupList ( $ resp ) ; } return new BatchGetLogsResponse ( $ resp , $ header ) ; }
Get logs from Log service with shardid conditions.
Unsuccessful operation will cause an Exception.

@param BatchGetLogsRequest $request the BatchGetLogs request parameters class.

@throws Exception
@return BatchGetLogsResponse
Get logs from Log service with shardid conditions . Unsuccessful operation will cause an Exception .