Last updated：2021-10-18 16:00:50
You can enable and disable logging for buckets in the Kingsoft Cloud Standard Storage Service (KS3) console. You can store the logs of a bucket in the same bucket itself or create a bucket in the same region to store the logs.
By default, logging is disabled for buckets in KS3. You can enable logging for a bucket and manually specify the storage location.
A log file is named in the format of
Log in to the KS3 console and click Bucket in the left navigation pane. On the page that appears, click the name of the target bucket.
The following table describes the fields in a log. The fields are arranged from left to right and separated with tabs.
|bucket_owner||NzM0MDEzMzI=||The Base64-encoded result of the Kingsoft Cloud account ID.|
|bucket||bucket_test||The bucket name.|
|time||[11/Jan/2016:15:05:35 +0800]||The time when the log was generated.|
|remote_ip||220.127.116.11||The request IP address.|
|requester||Anonymous||The requester. If the requester is an anonymous user, the field value is Anonymous.
If the requester is a Kingsoft Cloud account, the field value is the Base64-encoded result of the Kingsoft Cloud account ID.
If the requester is an IAM user, the field value is the Base64-encoded result of a string in the format of `ID of the Kingsoft Cloud account/Username of the IAM user.
|request_id||1e6ac821e4904e4ca21d3a9e0ce52e25||The request ID.|
|operation||REST.POST.OBJECT||The operation. The operation in this example is Post Object.|
|key||-||The object key.|
|request_uri||“POST /chenjin.jpg HTTP/1.1”||The request URL.|
|http_status||200||The request status code.|
|error_code||-||The error code.|
|bytes_sent||461||The number of bytes that are sent.|
|object_size||139008||The size of the accessed resource.|
|total_time||2||The total request duration, measured in seconds and accurate to milliseconds.|
|turn_around_time||2||The round trip duration between NGINX and the API server, measured in seconds and accurate to milliseconds.|
|referer||“http://ks3.ksyun.com/console.html”||The request referer.|
|user_agent||“Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36”||The user agent.|
|version_id||-||The version ID. This field is reserved.|
|storageclass||Standard||The storage class of the accessed resource.|
|usertype||-||The user type. By default, this field is not displayed for regular users. For CDN users, the field value is kc.|
|nginx_port||80||The NGINX port. Ports 8000 and 4433 are used for access over the internal network. Port 80 is used for access over the Internet.|
Did you find the above information helpful?
Please give us your feedback.
Thank you for your feedback.