• Object Storage Service

  1. Help Center
  2. Object Storage Service
  3. User Guide
  4. OBS Console Operation Guide
  5. Logging
  6. Configuring Logging

Configuring Logging

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.


  1. In the bucket list on the OBS Console, click the target bucket to go to the Summary page.
  2. Click the Logging card, and select Enable, as shown in Figure 1.

    Figure 1 Logging

  3. Select a bucket from Target Bucket (existing buckets) to store log files. Log delivery users of the selected target bucket will be automatically assigned with the ACL read permission and bucket write permission.
  4. Set Target Prefix to specify the prefix for log names.

    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.

    In OBS Console, 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.

    For example:

    • 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 in approximately fifteen minutes.

  5. Click OK.