Access Log Format

It will describe access log format. There will be space “ ” between every two fields as field separator.

  • Log Format Definition
Filed Name Comments
$remote_addr Client IP, e.g. 45.32.174.90
$user_country Client user country.
$remote_user Client user, not supported currently. Value is ”-”.
[$time_local] Request time, Format is Day/Month/Year:Hour24:Minute:Second Time zone, e.g. [11/Jan/2017:18:38:57 +0800]
"$request" HTTP request method, URL, e.g."GET http://image.example1.com/upload_files/images/360_270/20150410/eb252121-b392-4651-b938-117991cfb9b5.jpg"
$status HTTP status code, e.g. 200
$request_time HTTP request time, unit is millisecond. E.g. 955.123
$body_bytes_sent Length of http response body to client, not supported currently. Value is “-”
$bytes_sent Length of whole http response (Include HTTP header, status line). E.g. 52665
"$http_referer" HTTP Referrer. E.g. "http://www.example1.com/lib/testcases/tcEdit.php"
"$http_user_agent" HTTP User Agent. E.g. "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36"
"$http_x_forwarded_for" HTTP x-forward-for. Not support x-forwarded-for currently. Value is “-“.
"$connection" HTTP Connection ID, Only for debug purpose.E.g. "[000c7447]"
"$HIT" Cache status. ”HIT” means requests cached on CDN edge, or ”MISS” means not cached.
"$server_addr" IP address of requested CDN edge server. E.g. "14.136.132.158"
$ttfb Time to the first byte. Unit is millisecond, e.g. 0.452639
  • Log Format
$remote_addr $user_country $remote_user [$time_local] "$request" $status $request_time $body_bytes_sent $bytes_sent
"$http_referer" "$http_user_agent" "$http_x_forwarded_for" "$connection" "$HIT" "$server_addr" 
$ttfb
  • Access Log Example
45.32.174.90 SG - [11/Jan/2017:18:38:57 +0800] "GET http://images.example1.com/upload_files/
images/360_270/20150410/eb252121-b392-4651-b938-117991cfb9b5.jpg" 200 955.231 - 71344 
"http://www.example1.com/testcases/tcEdit.php" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 
(KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36" "-" "[000c7447]" 
"HIT" "203.116.18.250" 0.452639
           Updated 2024-08-26 07:42:13

results matching ""

    No results matching ""