字段解释

 %<chi>                客户端IP
%<caun> The username of the authenticated client. A hyphen (-) means that no authentication was required.
%<ttms> 响应时间,单位是毫秒/ms
%<cqts> 时间戳(The time of the client request since January 1, 1970 UTC (EPOCH), with second resolution.)
%<cqhm> The client request method: GET, POST, and so on.
%<cquuc> 原始的URL,即 This field records a URL before it is remapped (reverse proxy mode).
%<cqhv> HTTP版本,The client request HTTP version.
%<pssc> HTTP状态码
%<psql> 边缘server 返回的response长度,包括响应体和响应头,单位是 字节/byte
%<hii> 边缘server IP
%<pqsi> 回源server的IP,边缘server未命中,同机房server回源/上层server回源
%<crc> 边缘server响应的状态码
%<phr> 回源server响应的状态码
%<{Via}psh> 边缘server响应HTTP头部信息,截取Via信息
%<{Referer}cqh> 客户端请求的HTTP头部信息,截取Referer信息
%<{User-Agent}cqh> 客户端请求的HTTP头部信息,截取User-Agent信息
# 更多详细信息参考:https://docs.trafficserver.apache.org/en/6.2.x/admin-guide/monitoring/logging/log-formats.en.html

Cache Result Codes

     1)"TCP_MEM_HIT:NONE"                  边缘server内存命中(官网没有找到相关说明,自己臆断而来)
2)"TCP_HIT:NONE" 边缘server缓存命中
3)"TCP_MISS:SIBLING_HIT" 边缘server Miss,icp同机房回源命中
4)"TCP_MISS:PARENT_HIT" 边缘server Miss,icp Miss,parent回源命中
5)"TCP_REFRESH_HIT:PARENT_HIT" 边缘server含有客户端请求的object,但是不新鲜,所以边缘server向parent发起一个“if-modified-since”请求,parent返回304not-modified的响应,最后边缘server将本地的object返回。
6)"TCP_REFRESH_MISS:PARENT_HIT" 边缘server含有客户端请求的object,但是不新鲜,所以边缘server向parent发起一个“if-modified-since”请求,parent返回一个新的object给边缘server,最后边缘server将新获取到的object返回。
7)"ERR_CLIENT_ABORT:SIBLING_HIT" 客户端还没有完成数据的获取就断掉了链接(icp回源)
8)"ERR_CLIENT_ABORT:PARENT_HIT" 客户端还没有完成数据的获取就断掉了链接(parent回源)
...
9)"TCP_IMS_HIT:NONE" The client issued an if-modified-since request and the object was in cache and fresher than the IMS date, or an if-modified-since request to the origin server revealed the cached object was fresh. Traffic Server served the cached object to the client.
10)"TCP_IMS_MISS:PARENT_HIT"
11)"TCP_REF_FAIL_HIT:" The object was in the cache but was stale. Traffic Server made an if-modified-since request to the origin server but the server did not respond. Traffic Server sent the cached object to the client.
...
"ERR_CONNECT_FAIL:DIRECT"
"ERR_CONNECT_FAIL" -> Traffic Server could not reach the origin server. # 更多详细信息参考:https://docs.trafficserver.apache.org/en/6.2.x/admin-guide/monitoring/logging/log-formats.en.html#cache-result-codes

logs_xml.config

1 <LogFormat>
2 <Name = "access"/>
3 <Format = "\"live\" \"0.1\" \"%<chi>\" \"%<caun>\" \"%<ttms>\" \"%<cqts>\" \"%<cqhm>\" \"%<cquuc>\" \"%<cqhv>\" \"%<pssc>\" \"%<psql>\" \"%<hii>\" \"%<pqsi>\" \"%<crc>:%<phr>\" \"%<{Via}psh>\" \"%<{Referer}cqh>\" \"%<{User-Agent}cqh>\""/>
4 </LogFormat>
5 <LogObject>
6 <Format = "access"/>
7 <Filename = "access.log"/>
8 </LogObject>
  
05-06 12:39