When you access 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 to a specified bucket as objects.
- Log on to the OSS console.
- Click Buckets, and then click the name of the target bucket.
- Choose .
- Click Configure. Set Destination Bucketand Log Prefix.
Note For more information about the format of access logs and log naming conventions, see Access logging.
- Destination Bucket: Select the name of the bucket in which access logs are to store from the drop-down list. You must be the owner of the selected bucket and the bucket must be in the same region as the bucket for which logging is enabled.
- Log Prefix: Enter the directory where the access logs are generated and the prefix of the access logs. The access logs are stored in the specified directory. Example: log/<TargetPrefix>. The access logs are stored in the log/ directory.
- Click Save.