public function putBucketLogging($bucket, $targetBucket, $targetPrefix, $options = NULL)
    {
        $this->precheckCommon($bucket, NULL, $options, false);
        $this->precheckBucket($targetBucket, 'targetbucket is not allowed empty');
        $options[self::OSS_BUCKET] = $bucket;
        $options[self::OSS_METHOD] = self::OSS_HTTP_PUT;
        $options[self::OSS_OBJECT] = '/';
        $options[self::OSS_SUB_RESOURCE] = 'logging';
        $options[self::OSS_CONTENT_TYPE] = 'application/xml';

        $loggingConfig = new LoggingConfig($targetBucket, $targetPrefix);
        $options[self::OSS_CONTENT] = $loggingConfig->serializeToXml();
        $response = $this->auth($options);
        $result = new PutSetDeleteResult($response);
        return $result->getData();
    }
public function putBucketLogging($bucket, $targetBucket, $targetPrefix, $options = NULL)
    {
        $this->precheckCommon($bucket, NULL, $options, false);
        $this->precheckBucket($targetBucket, 'targetbucket is not allowed empty');
        $options[self::OSS_BUCKET] = $bucket;
        $options[self::OSS_METHOD] = self::OSS_HTTP_PUT;
        $options[self::OSS_OBJECT] = '/';
        $options[self::OSS_SUB_RESOURCE] = 'logging';
        $options[self::OSS_CONTENT_TYPE] = 'application/xml';

        $loggingConfig = new LoggingConfig($targetBucket, $targetPrefix);
        $options[self::OSS_CONTENT] = $loggingConfig->serializeToXml();
        $response = $this->auth($options);
        $result = new PutSetDeleteResult($response);
        return $result->getData();
    }
public function putBucketLogging ( $ bucket , $ targetBucket , $ targetPrefix , $ options = NULL ) { $ this -> precheckCommon ( $ bucket , NULL , $ options , false ) ; $ this -> precheckBucket ( $ targetBucket , 'targetbucket is not allowed empty' ) ; $ options [ self :: OSS_BUCKET ] = $ bucket ; $ options [ self :: OSS_METHOD ] = self :: OSS_HTTP_PUT ; $ options [ self :: OSS_OBJECT ] = '/' ; $ options [ self :: OSS_SUB_RESOURCE ] = 'logging' ; $ options [ self :: OSS_CONTENT_TYPE ] = 'application/xml' ; $ loggingConfig = new LoggingConfig ( $ targetBucket , $ targetPrefix ) ; $ options [ self :: OSS_CONTENT ] = $ loggingConfig -> serializeToXml ( ) ; $ response = $ this -> auth ( $ options ) ; $ result = new PutSetDeleteResult ( $ response ) ; return $ result -> getData ( ) ; }
Sets the bycket logging config. Only owner can call this API.

@param string $bucket bucket name
@param string $targetBucket The logging file's bucket
@param string $targetPrefix The logging file's prefix
@param array $options By default is empty.
@throws OssException
@return null
Sets the bycket logging config . Only owner can call this API .