tencent cloud


Setting Logging

Last updated: 2022-05-01 17:43:03


    COS introduces the Logging feature to record bucket operation requests, facilitating bucket usage and management. You can enable it in the COS console. For more information, see Log Management Overview.


    • Currently, Logging is only available for the Beijing, Shanghai, Guangzhou, Nanjing, Chongqing, Chengdu, Hong Kong (China), Singapore, Toronto, Silicon Valley, and Mumbai regions.
    • Currently, only the bucket owner has permission to set Logging, and other users cannot see the Logging configuration item in the console.
    • Logs are delivered once every 5 minutes and are not 100% accurate. Therefore, they are for reference only and cannot be used for usage measurement and billing.


    1. Log in to the COS console.
    2. Click Bucket List in the left sidebar.
    3. Click the source bucket that you want to enable Logging for.
    4. Click Logging > Logging. Then, click Edit and enable Status.
    5. Configure the configuration items of Logging as follows:
    • Destination Bucket: The destination bucket that stores the source bucket’s logs must reside in the same region as the source bucket. You are not advised to set the source bucket itself as the destination bucket.
    • Path Prefix: A custom path prefix for the logs. If this field is left empty, logs will be delivered to the root directory of the destination bucket.
    • Service Authorization: CLS needs to be authorized to deliver logs to your bucket.
    1. Click Save.

      It takes several minutes or longer for the logs to be generated and delivered to the destination bucket.

    2. Go to the destination bucket configured to view the generated logs.
    3. After downloading the logs, you can view them in detail. For more information, see Log Management Overview.


    1. To enable Logging, you need to create a log role in the CAM console and grant the role permissions to read/write logs of the source bucket.
    2. If Logging is disabled yet the role is not deleted, the role's read/write permissions on the source bucket’s logs still exist.
    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