You can enable logging to facilitate analysis or audit as required. Access logs enable a bucket owner to analyze the property, type, or trend of requests to the bucket in depth. When the logging function of a bucket is enabled, OBS will log access requests for the bucket automatically, and write the generated log files to the specified bucket (target bucket).
The logging function itself is offered for free, only the space occupied by log files is charged.
After logging is enabled, the log delivery user group will be automatically granted the permission to read the bucket ACL and write the bucket where logs are saved. If you manually disable such permissions, bucket logging fails.
OBS can record bucket access requests in logs for request analysis and log audit.
Logs occupy some OBS storage space rented by users, causing extra fees. For this reason, OBS does not collect bucket access logs by default.
After logging is configured, you can view operation logs in the bucket that stores the logs in approximately fifteen minutes.
The following shows an example access log of the target bucket:
787f2f92b20943998a4fe2ab75eb09b8 bucket [13/Aug/2015:01:43:42 +0000] xx.xx.xx.xx
787f2f92b20943998a4fe2ab75eb09b8 281599BACAD9376ECE141B842B94535B REST.GET.BUCKET.LOCATION
- "GET /bucket?location HTTP/1.1" 200 - 211 - 6 6 "-" "HttpClient" - -
The access log of each bucket contains the following information.
Account ID of the bucket owner
Account ID corresponds to Domain ID on the My Credential page.
Name of the bucket
Timestamp of the request (UTC)
IP address from where the request is initiated
Name of the operation
GET /bucket?location HTTP/1.1
URI of the request
Size of the HTTP response, expressed in bytes
Object size (bytes)
Processing time on the server (ms)
Total time for processing the request (ms)
Header field Referer of the request
User-Agent header of the request
Version ID carried in the request
Federated authentication and agency information
Current storage class of the object
Storage class that the object will be transited to