jsproxy/log.conf
2019-05-29 20:26:46 +08:00

44 lines
1.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#
# 日志格式定义
# 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'
;