After Logging is enabled for a bucket, OBS automatically converts bucket logs into objects following the naming rules and writes the objects into a target bucket.
The log delivery user group has been assigned the Write and ACL View permissions for the target bucket. For details, see section Configuring Bucket ACL.
- Log in to OBS Browser.
- Click the blank area in the row of the bucket for which you want to configure logging and choose More > Configure Logging.
- Select Enable, select a value for Target Bucket, and enter a value for Target Prefix, as shown in Figure 1. Then, click Save.
Figure 1 Logging
- Target Bucket indicates the bucket storing logs.
- Target Prefix indicates the prefix of a log file name.
After logging is enabled, generated logs are named using the following format:
- <TargetPrefix> indicates the specific target prefix.
- YYYY-mm-DD-HH-MM-SS indicates the date and time when the log is generated.
- <UniqueString> indicates a character string generated by OBS.
On OBS Browser, if configured <TargetPrefix> ends with a slash (/), logs generated in the bucket are stored in the <TargetPrefix> folder in the target bucket to facilitate management.
- If the target bucket is bucket and target prefix is bucket-log/, all logs are stored in the bucket-log/ folder in bucket. The log file is named as follows: 2015-06-29-12-22-07-N7MXLAF1BDG7MPDV.
- If the target bucket is bucket and target prefix is bucket-log, all logs are directly stored in bucket. The log file is named as follows: bucket-log2015-06-29-12-22-07-N7MXLAF1BDG7MPDV.
After log management is configured, you can view the operation logs in the target bucket that stores the logs within approximately fifteen minutes.
- In the dialog box that is displayed, click OK.