A large number of logs are generated when your Object Storage Service (OSS) buckets are accessed. After you enable and configure logging for a bucket, OSS generates logs every hour in accordance with predefined naming conventions and then stores the logs as objects in a specified bucket. You can use Alibaba Cloud Log Service or build a Spark cluster to analyze the logs.
- Log on to the OSS console.
- In the left-side navigation pane, click Buckets. On the Buckets page, click the name of the bucket for which you want to configure logging.
- In the left-side navigation pane, choose .
- Click Configure. Set Destination Bucket and Log Prefix.
- 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 within the same Alibaba Cloud account.
- Log Prefix: Enter the path and prefix of the logs. If you specify this parameter, log objects are stored in a specified directory of the destination bucket. If you do not specify this parameter, log objects are stored in the root directory of the destination bucket. For example, if you enter log/ in the Log Prefix field, the log objects are stored in the log/ directory.
- Click Save.