From 8ff8bf3733ec73eab189018b6e604f3157ca139f Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Mon, 7 Oct 2024 09:03:45 -0700 Subject: [PATCH 1/2] Fix #1498: enable access/request log by default --- src/main/resources/application.yaml | 9 +++++---- src/test/resources/application.yaml | 5 ++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index ef762aafe9..2bd76936e8 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -76,6 +76,11 @@ quarkus: # HTTP settings http: + # access log format, must be explicitly enabled + access-log: + enabled: true + pattern: "%h %l %t \"%r\" %s %b" + # every /v1 path is authenticated by default # adapt if changing the authentication mechanism auth: @@ -87,10 +92,6 @@ quarkus: paths: /v1/* policy: authenticated - # access log format, must be explicitly enabled - access-log: - pattern: "%h %l %t \"%r\" %s %b" - limits: # Let's limit low-level maximum HTTP request size to 20 megs: stricter # limit (4 meg per document) is applied at the JSON API level. diff --git a/src/test/resources/application.yaml b/src/test/resources/application.yaml index 34cba27fff..1c39d4ff03 100644 --- a/src/test/resources/application.yaml +++ b/src/test/resources/application.yaml @@ -5,4 +5,7 @@ stargate: # change test port from 8081 (used by other SG services) quarkus: http: - test-port: 9080 \ No newline at end of file + # access log format, disable for tests to reduce noise + access-log: + enabled: false + test-port: 9080 From 8237100a8015ed420cf1ebd73296578c6e69497d Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Mon, 7 Oct 2024 09:40:59 -0700 Subject: [PATCH 2/2] Change log level to include access log in output --- src/main/resources/application.yaml | 2 ++ src/test/resources/application.yaml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 2bd76936e8..51fe344d14 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -116,6 +116,8 @@ quarkus: level: ERROR 'com.datastax.oss.driver': level: WARN + 'io.quarkus.http.access-log': + level: INFO 'io.stargate': level: WARN diff --git a/src/test/resources/application.yaml b/src/test/resources/application.yaml index 1c39d4ff03..2b900992b9 100644 --- a/src/test/resources/application.yaml +++ b/src/test/resources/application.yaml @@ -5,7 +5,7 @@ stargate: # change test port from 8081 (used by other SG services) quarkus: http: - # access log format, disable for tests to reduce noise + # access log format, disabled for tests to reduce noise access-log: enabled: false test-port: 9080