Skip to content

Instantly share code, notes, and snippets.

@elephantum
Created February 12, 2014 10:34
Show Gist options
  • Save elephantum/8953132 to your computer and use it in GitHub Desktop.
Save elephantum/8953132 to your computer and use it in GitHub Desktop.
log_format jsonlog '{'
'"time_local": "$time_local", '
'"request": "$request", '
'"msec": "$msec", '
'"status": "$status", '
'"body_bytes_sent": "$body_bytes_sent", '
'"request_time": "$request_time", '
'"remote_addr": "$remote_addr", '
'"remote_user": "$remote_user", '
'"http_host": "$http_host", '
'"http_referer": "$http_referer", '
'"http_user_agent": "$http_user_agent", '
'"http_x_forwarded_for": "$http_x_forwarded_for", '
'"upstream_addr": "$upstream_addr", '
'"upstream_http_host": "$upstream_http_host", '
'"upstream_response_time": "$upstream_response_time", '
'"upstream_cache_status": "$upstream_cache_status"'
'}';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment