diff --git a/nginx.tmpl b/nginx.tmpl index b3fddb1..b87a512 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -38,9 +38,19 @@ map $http_upgrade $proxy_connection { gzip_types text/plain text/css application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; -log_format vhost '$host $remote_addr - $remote_user [$time_local] ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent"'; +log_format vhost '{"time": "$time_iso8601", ' + '"host": "$host", ' + '"remote_addr": "$remote_addr", ' + '"remote_user": "$remote_user", ' + '"body_bytes_sent": "$body_bytes_sent", ' + '"request_time": "$request_time", ' + '"status": "$status", ' + '"request": "$request", ' + '"request_uri": "$uri", ' + '"request_method": "$request_method", ' + '"http_referrer": "$http_referer", ' + '"http_x_forwarded_for": "$http_x_forwarded_for", ' + '"http_user_agent": "$http_user_agent"}'; access_log off;