update
This commit is contained in:
parent
c50569d73e
commit
a624163120
27 changed files with 215 additions and 6 deletions
23
http/log-format-upstream.conf
Normal file
23
http/log-format-upstream.conf
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# Define a reusable access log format with upstream timing fields, but do not
|
||||
# enable logging by default. Individual servers still choose their own log path
|
||||
# and whether this format is worth the I/O cost.
|
||||
#
|
||||
# Example:
|
||||
# access_log /var/log/nginx/access.log upstream_timing;
|
||||
log_format upstream_timing escape=json
|
||||
'{'
|
||||
'"time":"$time_iso8601",'
|
||||
'"remote_addr":"$remote_addr",'
|
||||
'"host":"$host",'
|
||||
'"request":"$request",'
|
||||
'"status":$status,'
|
||||
'"body_bytes_sent":$body_bytes_sent,'
|
||||
'"request_time":$request_time,'
|
||||
'"upstream_addr":"$upstream_addr",'
|
||||
'"upstream_status":"$upstream_status",'
|
||||
'"upstream_connect_time":"$upstream_connect_time",'
|
||||
'"upstream_header_time":"$upstream_header_time",'
|
||||
'"upstream_response_time":"$upstream_response_time",'
|
||||
'"http_referer":"$http_referer",'
|
||||
'"http_user_agent":"$http_user_agent"'
|
||||
'}';
|
||||
Loading…
Add table
Add a link
Reference in a new issue