How can I disable logs of status API in proxy container of Kong?
I am using Kong helm chart.
Helm chart version: 2.38.0
Kong application version: 3.6
I have changed ‘log_level’ environment variable to error, but still Kong logs of status API in proxy container.
These logs don’t have any log level. I require to check status of it, but don’t log it.
I am using ‘httpGet’ for readiness and liveness probes.
Please let me know if you require more information.
These are set from two kong.conf settings separate from log_level
: kong/kong.conf.default at 56d42bebcd9e71271a86c6041c78c4a89daef2c7 · Kong/kong · GitHub
Status access logs should already be disabled by default according to that, so you shouldn’t normally see any logs for it other than errors. The error logs share the same access level as all other error logs.
You can set these directly using the chart’s env
setting in values.yaml, so env.status_access_log = off
and env.status_error_log = /dev/null
to disable them.
env.log_level
should allow you to set the error log level if you don’t wish to discard it entirely, but there’s no way to increase the log level separately from the rest of the proxy/admin/etc. error logs, unfortunately.
Hi @traines,
I have applied changes as per your suggestion, but it is still logging status logs.
Please let me know if you require more information.
Hi @traines,
Do you have any update on this?
I can see this issue in Kong GitHub repo:
KONG_STATUS_ACCESS_LOG value does not work · Issue #13344 · Kong/kong · GitHub
It is similar to my case.
If the gateway’s not honoring the setting, not much I can do about that–I can only help get the settings there from the Kubernetes resource side. If that’s indeed broken on the gateway side, that issue is probably the best option to track it.