nginx 打印详细请求

log_format main escape=json '{ "@timestamp": "$time_iso8601", '
                       '"remote_addr": "$remote_addr",'
                       '"costime": "$request_time",'
                       '"realtime": "$upstream_response_time",'
                       '"status": $status,'
                       '"x_forwarded": "$http_x_forwarded_for",'
                       '"referer": "$http_referer",'
                       '"request": "$request",'
                       '"upstr_addr": "$upstream_addr",'
                       '"bytes":$body_bytes_sent,'
                       '"dm":$request_body,'
                       '"agent": "$http_user_agent" }';

 

posted @ 2019-05-28 13:57  rubekid  阅读(5876)  评论(0编辑  收藏  举报