Created
June 29, 2018 08:56
-
-
Save Kushal712/b49906379c22074acbbd6b463f9f6b16 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
log_format le_json '{' | |
'"created_at": "$time_iso8601", ' | |
'"remote_addr": "$remote_addr", ' | |
'"remote_user": "$remote_user", ' | |
'"request": "$request", ' | |
'"request_method": "$request_method", ' | |
#'"postdata" : "$request_body", ' | |
'"request_response_time": "$request_time", ' | |
'"upstream_response_time": "$upstream_response_time", ' | |
'"upstream_addr": "$upstream_addr", ' | |
'"body_bytes_sent": $body_bytes_sent, ' | |
'"msec": "$msec", ' | |
'"status": "$status", ' | |
'"http_referrer": "$http_referer", ' | |
'"platform": "$upstream_http_x_platform", ' | |
'"chcount": "$upstream_http_x_chcount", ' | |
'"device": "$upstream_http_x_device", ' | |
'"http_user_agent": "$http_user_agent"' '}'; | |
access_log /var/log/nginx/access_upstream.log le_json; | |
error_log /var/log/nginx/error.log; | |
rewrite_log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment