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.
- 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 naming conventions, see Logging.
- Destination Bucket: Select the name of the bucket from the drop-down list in which access logs are to store. 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 prefix and folder where the access logs are stored. Example: log/<TargetPrefix>. The access logs are stored in the log/ directoey.
- Click Save.