Created
February 15, 2016 04:04
-
-
Save mjcreativeventures/ff0a8aafc4846b2cb2b0 to your computer and use it in GitHub Desktop.
nginx logging using json format
This file contains hidden or 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 '"time": "$time_iso8601", ' | |
'"remote_addr": "$remote_addr", ' | |
'"remote_user": "$remote_user", ' | |
'"body_bytes_sent": "$body_bytes_sent", ' | |
'"request_time": "$request_time", ' | |
'"status": "$status", ' | |
'"request": "$request", ' | |
'"request_method": "$request_method", ' | |
'"http_referrer": "$http_referer", ' | |
'"http_user_agent": "$http_user_agent"'; | |
access_log /var/log/nginx/access.log le_json; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment