Updated on 2025-08-26 GMT+08:00

Configuring Logging for a Bucket

When a bucket is accessed, OBS records request logs related to bucket operations. After logging is enabled for a bucket, OBS stores logs in the logged bucket or another bucket that belongs to the same account and region as the logged bucket. You can search and analyze logs to trace and locate abnormal events. This section describes how to configure logging, verify the logging configuration, and disable logging for a bucket.

Configuring Logging for a Bucket

You can use OBS Console, APIs, or SDKs to configure logging for a bucket.

Verifying the Logging Configuration of a Bucket

After configuring logging for a bucket, you can use OBS Console, APIs, SDKs, or obsutil to verify the logging configuration of the bucket. You can check whether log files are generated and whether they can be accessed.

Disabling Logging for a Bucket

Uploading bucket logs to and storing them in the log storage bucket will incur PUT request and storage costs. If you no longer need to record logs, disable logging for the bucket. After logging is disabled, logs are not recorded, but existing logs in the log storage bucket will be retained.

You can use OBS Console to disable logging for a bucket.

References