tencent cloud


Enabling Log Collection

Last updated: 2021-06-08 16:10:08

SDK Description

StartLogging is used to enable log collection.

Request Parameters

Parameter Name Required Type Description
Name Yes String CloudAudit name
## Response Parameters
The response parameter is null.


Request example

$config = array('SecretId'       => 'Your secretId',
              'SecretKey'      => 'Your secretKey',
              'RequestMethod'  => 'GET',
              'DefaultRegion'  => 'gz');
$ca = QcloudApi::load(QcloudApi::MODULE_CLOUDAUDIT, $config);
$package = array('Name'=>'ayisunxxx');
$a = $ca->StartLogging($package);
if ($a === false) {
  $error = $ca->getError();
  echo "Error code:" . $error->getCode() . ".\n";
  echo "message:" . $error->getMessage() . ".\n";
  echo "ext:" . var_export($error->getExt(), true) . ".\n";
} else {
echo "\nRequest :" . $ca->getLastRequest();
echo "\nResponse :" . $ca->getLastResponse();
echo "\n";

Response example

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support