On setting the KONG_NGINX_HTTP_LOG_FORMAT env variable it throws the below error
Error: could not prepare Kong prefix at /usr/local/kong: nginx configuration is invalid (exit code 1):
kong_1 | nginx: [emerg] unexpected "k" in /usr/local/kong/nginx-kong.conf:45
kong_1 | nginx: configuration file /usr/local/kong/nginx.conf test failed
Trying to set a json format log format
KONG_NGINX_HTTP_LOG_FORMAT=compression escape=json '{\"time_local\":\"$time_local\", \"remote_addr\":\"$remote_addr\",\"remote_user\":\"$remote_user\",\"request\":\"$request\",\"status\":$status,\"body_bytes_sent\":$body_bytes_sent,\"request_time\":$request_time,\"http_referrer\":\"$http_referer\", \"http_user_agent\":\"$http_user_agent\",\"http_x_forwarded_for\":\"$http_x_forwarded_for\",\"host\":\"$host\"}
Kong Version: 2.5