Add JSON log format to openresty

This commit is contained in:
Râu Cao
2023-07-26 11:50:24 +02:00
parent 507a812f33
commit 4b08e4fc8c
2 changed files with 18 additions and 10 deletions

View File

@@ -3,5 +3,7 @@
# Recipe:: default
#
node.normal['openresty']['log_formats']['json'] = '{"ip":"$remote_addr","time":"$time_local","host":"$host","method":"$request_method","uri":"$uri","status":$status,"size":$body_bytes_sent,"referer":"$http_referer","upstream_addr":"$upstream_addr","upstream_response_time":"$upstream_response_time","ua":"$http_user_agent"}'
# Install openresty from official packages
include_recipe 'openresty::apt_package'