Updated on 2026-09-23 GMT+08:00

Configuring Logging for a Bucket

When a bucket is accessed, OBS logs all requests to the bucket. After log storage is enabled for the bucket, OBS stores the logs either in the logged bucket or in another bucket that belongs to the same account and region. You can search and analyze these 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 Log Storage for a Bucket

You can use OBS Console, APIs, or SDKs to configure log storage for a bucket. You cannot use OBS Browser+ or obsutil to do so.

Verifying the Log Storage Configuration of a Bucket

After configuring Log Storage for a bucket, you can use OBS Console, APIs, SDKs, or obsutil to verify the configuration. You can check whether OBS has generated log files and whether you have access to them. You cannot use OBS Browser+ to do so.

Disabling Log Storage for a Bucket

Uploading and storing bucket logs incurs costs for PUT requests and storage. If you no longer need to record logs, disable logging for the bucket. After logging is disabled, OBS stops generating new logs, but any existing logs in the log storage bucket are retained.

You can use OBS Console to disable log storage for a bucket. You cannot use APIs, SDKs, OBS Browser+, or obsutil to do so.

References

If you are using the old IAM console, see Creating an Agency for Uploading Logs. If you are using the new IAM console, see Creating a Trust Agency for Uploading Logs.