Skip to content

Instantly share code, notes, and snippets.

@edvakf
Last active December 27, 2015 14:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edvakf/7340616 to your computer and use it in GitHub Desktop.
Save edvakf/7340616 to your computer and use it in GitHub Desktop.
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