Support time format to ISO-8601 style

This commit is contained in:
Kim Hyun 2017-11-12 12:13:44 +09:00
parent f2fa86c605
commit 62023120a9

View file

@ -54,9 +54,15 @@ map $scheme $proxy_x_forwarded_ssl {
gzip_types text/plain text/css application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
{{ if $.Env.TIMEFMT_ISO }}
log_format vhost '$host $remote_addr - $remote_user [$time_iso8601] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
{{ else }}
log_format vhost '$host $remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
{{ end }}
access_log off;