| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- #
- # 日志格式定义
- # https://nginx.org/en/docs/http/ngx_http_log_module.html
- #
- # 分隔: tab (\t)
- # 前缀: 格式版本。格式变化时递增,方便解析
- # 备注:
- # origin_id
- # 请求源的别名,参考 allowed-sites.conf
- # ver
- # 前端配置的版本,定义于 www/conf.js
- # remote_addr
- # 用户 IP,目前未考虑 XFF
- # level
- # 实验中。记录切换状态(首次请求为 1。切换失败再次请求为 0,表示不接受切换)
- # switched
- # 实验中。记录是否切换到廉价节点(未切换则为空,有切换则记录资源体积大小)
- # bodyhash
- # 返回内容的 SHA256,用于统计重复内容
- # upstream_http_access_control_allow_origin
- # 统计支持 cors 的站点,用于加入直接列表
- # ref
- # 请求 referer,不包括 `https://example.com/-----` 部分
- # mode
- # 前端 request.mode 属性
- # type
- # 前端 request.destination 属性
- #
- log_format log_proxy escape=none
- '02 '
- '$time_iso8601 $_origin_id $_ver $remote_addr '
- '$_level $_switched $upstream_cache_status $request_time '
- '$request_length $bytes_sent '
- '$request_method $_url $status $_bodyhash $upstream_http_access_control_allow_origin '
- '$http_user_agent $_ref $_mode $_type'
- ;
- log_format log_www escape=none
- '01 '
- '$time_iso8601 $remote_addr $request_time '
- '$request_method $uri $http_host $status '
- '$http_user_agent'
- ;
|