Updated on 2025-11-10 GMT+08:00

Configuring Logging for a Bucket

When a bucket is accessed, OBS logs all the requests for the bucket. After logging is enabled for the bucket, OBS stores the logs either in the logged bucket or another bucket that belongs to the same account and region as the logged bucket. 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 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. You can check whether OBS has generated log files and whether you have access to them.

Disabling Logging for a Bucket

Uploading and storing bucket logs will incur 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 recording new logs, but existing logs in the log storage bucket will be retained.

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

References