You can log in to the COS Console to enable log management for a bucket, which records various requests related to bucket operations. Log management facilitates buckets usage and management. For more information, please see Log Management Overview.
- Currently, COS offers the logging feature only in 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 log management, and the Log Management configuration item will not be displayed to other users when they log in to the console.
- The log data is delivered once every 5 minutes. COS does not guarantee 100% accuracy of the log data. Such data is for reference only and does not serve as a basis for usage measurement and billing.
- Log in to the COS Console, click Bucket List on the left sidebar, and click the source bucket for which to enable log management.
- Click Log Management > Log Storage on the left and then click Edit to change the current status to "On".
- Configure the configuration items of log storage as follows:
- Destination Bucket: the source bucket ** for which log management is enabled and the **destination bucket that stores the logs must be in the same region. COS does not recommend you use the source bucket itself as the destination bucket.
- Path Prefix: enter a custom path prefix that makes it easy for you to find logs. If this field is left empty, it will default to the root path of the destination bucket.
- Service Authorization: you need to authorize the CLS service to deliver access logs to your bucket.
- After confirming that the entered information is correct, click Save. The log management feature is now enabled.
Log generation and delivery to the destination bucket may take several minutes or longer. Please wait patiently.
- Find the destination bucket that you configured to store logs, and you can see the generated log files.
- To enable the log management feature, you need to create a log role in the CAM Console and grant it read/write permission to the logs of the destination bucket.
- When the log management feature is disabled, if the role is not deleted, its read/write permission to the logs of the destination bucket will not be revoked.