From b65177dea5eacef9d749e963074ead9967ace58b Mon Sep 17 00:00:00 2001 From: Tina Usova Date: Mon, 3 Nov 2025 12:38:31 +0000 Subject: [PATCH 1/2] Description for setting custom format for access_log or turning it OFF --- .../ngf/how-to/data-plane-configuration.md | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/content/ngf/how-to/data-plane-configuration.md b/content/ngf/how-to/data-plane-configuration.md index 1fb00c9c2..ab719128a 100644 --- a/content/ngf/how-to/data-plane-configuration.md +++ b/content/ngf/how-to/data-plane-configuration.md @@ -272,6 +272,48 @@ of a few arguments. {{< /call-out >}} --- +## Configure the data plane log format + +NGINX records client requests immediately after each request is processed. You can use the `NginxProxy` resource to dynamically configure the access log format. + +The following command creates a basic `NginxProxy` that defines a custom log format `$remote_addr - [$time_local] "$request" $status $body_bytes_sent`: + +```yaml +kubectl apply -f - <}} File destinations in `logging.accessLog.path` are not currently supported. Any value other than `off` is replaced with `/dev/stdout`. {{< /call-out >}} + +--- + ### Run NGINX Gateway Fabric with NGINX in debug mode To run NGINX Gateway Fabric with NGINX in debug mode, during [installation]({{< ref "/ngf/install/" >}}), follow these additional steps: From b4b9dc3fad66cbd0cc1858ca4c78654fde7bcc8c Mon Sep 17 00:00:00 2001 From: Tina Usova Date: Thu, 6 Nov 2025 12:35:53 +0000 Subject: [PATCH 2/2] Fix according to new data structure --- content/ngf/how-to/data-plane-configuration.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/content/ngf/how-to/data-plane-configuration.md b/content/ngf/how-to/data-plane-configuration.md index ab719128a..8fd5e2b38 100644 --- a/content/ngf/how-to/data-plane-configuration.md +++ b/content/ngf/how-to/data-plane-configuration.md @@ -286,12 +286,8 @@ metadata: name: ngf-proxy-config spec: logging: - logFormat: - name: custom_format - format: $remote_addr - [$time_local] "$request" $status $body_bytes_sent accessLog: - path: /dev/stdout - format: custom_format + format: $remote_addr - [$time_local] "$request" $status $body_bytes_sent EOF ``` @@ -306,11 +302,11 @@ metadata: spec: logging: accessLog: - path: off + disabled: true EOF ``` -{{< call-out "note" >}} File destinations in `logging.accessLog.path` are not currently supported. Any value other than `off` is replaced with `/dev/stdout`. {{< /call-out >}} +{{< call-out "note" >}} File destinations in `logging.accessLog` are not currently supported it is always set to `/dev/stdout`. {{< /call-out >}} ---