When you access Object Storage Service (OSS), a large number of access logs are generated. You can enable logging to facilitate log queries. After you enable and configure logging for a bucket, OSS generates an object on an hourly basis based on the predefined naming conventions. This way, access logs are written as objects to a specified bucket.
For more information about how to create an AccessKey pair, see Create an AccessKey pair for a RAM user.
- Log on to the OSS console.
- Click Buckets, and then click the name of the target bucket.
- In the left-side navigation pane, choose .
- Click Configure. Set Destination Bucket and Log Prefix.
Note For more information about the format of access logs and log object naming conventions, see Logging.
- Destination Bucket: Select a bucket name from the Destination Bucket drop-down list. You can only select a bucket that is located in the same region as the bucket for which logging is enabled under the same Alibaba Cloud account.
- Log Prefix: Enter the path and prefix of the logs. If you configure this parameter, the log objects are stored in the specified directory of the destination bucket. If you do not configure this parameter, the log objects are stored in the root directory of the destination bucket. For example, if you enter log/ in Log Prefix, the logs are stored in the log/ directory.
- Click Save.