Skip to content

Instantly share code, notes, and snippets.

@edvakf edvakf/nginx.conf
Last active Dec 27, 2015

Embed
What would you like to do?
isuconで使えそうなnginxのログ形式
log_format ltsv
"time:$time_iso8601"
"\treq_time:$request_time"
"\tapp_time:$upstream_response_time"
"\tres_size:$bytes_sent"
"\tstatus:$status"
"\tmethod:$request_method"
"\tpath:$request_uri"
"\thost:$remote_addr"
"\tua:$http_user_agent"
;
#ポイントは
# timeは仕様のない$local_timeではなく$time_iso8601なのでRubyだとTime.iso8601でパースできる
# $http_user_agentと$request_uriを後ろに持ってくることで前の方のカラムが揃う
# 自作スクリプトが使える
# http://qiita.com/edvakf@github/items/3bdd46b53d65cf407fa2
# http://qiita.com/edvakf@github/items/4bc602b1e322622777ab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.