nginx日志格式配置
log_format main '{"logtime": "$time_local", '
'"client_ip": "$remote_addr", '
'"remote_user": "$remote_user", '
'"http_referer": "$http_referer", '
'"resp_len": "$body_bytes_sent", '
'"waster_time": "$request_time", '
'"status": "$status", '
'"request_path": "$request", '
'"request_method": "$request_method", '
'"request_url": "$http_referer", '
'"body_bytes_sent":"$body_bytes_sent", '
'"http_forwarded": "$http_x_forwarded_for", '
'"user_agent": "$http_user_agent" ,'
'"upstream": "$upstream_addr",'
'"upstream_time": "$upstream_response_time",'
'"upstream_status": "$upstream_status"}';
https://www.cnblogs.com/kevingrace/p/5893499.html