feat: allow logging the SQL query to stderr

- Logs the main SQL query when `log-query=main-query`.
- Only logs at the current `log-level`.
This commit is contained in:
Laurence Isla
2025-02-18 19:17:26 -05:00
committed by GitHub
parent 66e966d864
commit 9c880c082a
32 changed files with 267 additions and 48 deletions
+1
View File
@@ -25,6 +25,7 @@ jwt-secret = ""
jwt-secret-is-base64 = true
jwt-cache-max-lifetime = 0
log-level = "error"
log-query = "disabled"
openapi-mode = "follow-privileges"
openapi-security-active = false
openapi-server-proxy-uri = ""
@@ -25,6 +25,7 @@ jwt-secret = ""
jwt-secret-is-base64 = true
jwt-cache-max-lifetime = 0
log-level = "error"
log-query = "disabled"
openapi-mode = "follow-privileges"
openapi-security-active = false
openapi-server-proxy-uri = ""
@@ -25,6 +25,7 @@ jwt-secret = ""
jwt-secret-is-base64 = true
jwt-cache-max-lifetime = 0
log-level = "error"
log-query = "disabled"
openapi-mode = "follow-privileges"
openapi-security-active = false
openapi-server-proxy-uri = ""
+1
View File
@@ -25,6 +25,7 @@ jwt-secret = ""
jwt-secret-is-base64 = false
jwt-cache-max-lifetime = 0
log-level = "error"
log-query = "disabled"
openapi-mode = "follow-privileges"
openapi-security-active = false
openapi-server-proxy-uri = ""
@@ -25,6 +25,7 @@ jwt-secret = ""
jwt-secret-is-base64 = false
jwt-cache-max-lifetime = 0
log-level = "error"
log-query = "disabled"
openapi-mode = "follow-privileges"
openapi-security-active = false
openapi-server-proxy-uri = ""
@@ -25,6 +25,7 @@ jwt-secret = ""
jwt-secret-is-base64 = false
jwt-cache-max-lifetime = 0
log-level = "error"
log-query = "disabled"
openapi-mode = "follow-privileges"
openapi-security-active = false
openapi-server-proxy-uri = ""
@@ -25,6 +25,7 @@ jwt-secret = ""
jwt-secret-is-base64 = false
jwt-cache-max-lifetime = 0
log-level = "error"
log-query = "disabled"
openapi-mode = "follow-privileges"
openapi-security-active = false
openapi-server-proxy-uri = ""
@@ -25,6 +25,7 @@ jwt-secret = ""
jwt-secret-is-base64 = false
jwt-cache-max-lifetime = 0
log-level = "error"
log-query = "disabled"
openapi-mode = "follow-privileges"
openapi-security-active = false
openapi-server-proxy-uri = ""
@@ -25,6 +25,7 @@ jwt-secret = ""
jwt-secret-is-base64 = false
jwt-cache-max-lifetime = 0
log-level = "error"
log-query = "disabled"
openapi-mode = "follow-privileges"
openapi-security-active = false
openapi-server-proxy-uri = ""
@@ -25,6 +25,7 @@ jwt-secret = "ODERREALLYREALLYREALLYREALLYVERYSAFE"
jwt-secret-is-base64 = false
jwt-cache-max-lifetime = 7200
log-level = "info"
log-query = "main-query"
openapi-mode = "disabled"
openapi-security-active = false
openapi-server-proxy-uri = "https://otherexample.org/api"
@@ -25,6 +25,7 @@ jwt-secret = "OVERRIDE=REALLY=REALLY=REALLY=REALLY=VERY=SAFE"
jwt-secret-is-base64 = false
jwt-cache-max-lifetime = 3600
log-level = "info"
log-query = "main-query"
openapi-mode = "ignore-privileges"
openapi-security-active = true
openapi-server-proxy-uri = "https://example.org/api"
@@ -25,6 +25,7 @@ jwt-secret = "c2VjdXJpdHl0aHJvdWdob2JzY3VyaXR5aW5iYXNlNjQ="
jwt-secret-is-base64 = true
jwt-cache-max-lifetime = 86400
log-level = "info"
log-query = "main-query"
openapi-mode = "ignore-privileges"
openapi-security-active = true
openapi-server-proxy-uri = "https://postgrest.org"
+1
View File
@@ -25,6 +25,7 @@ jwt-secret = ""
jwt-secret-is-base64 = false
jwt-cache-max-lifetime = 0
log-level = "error"
log-query = "disabled"
openapi-mode = "follow-privileges"
openapi-security-active = false
openapi-server-proxy-uri = ""
+1
View File
@@ -28,6 +28,7 @@ PGRST_JWT_SECRET: c2VjdXJpdHl0aHJvdWdob2JzY3VyaXR5aW5iYXNlNjQ=
PGRST_JWT_SECRET_IS_BASE64: true
PGRST_JWT_CACHE_MAX_LIFETIME: 86400
PGRST_LOG_LEVEL: info
PGRST_LOG_QUERY: 'main-query'
PGRST_OPENAPI_MODE: 'ignore-privileges'
PGRST_OPENAPI_SECURITY_ACTIVE: true
PGRST_OPENAPI_SERVER_PROXY_URI: 'https://postgrest.org'
+1
View File
@@ -25,6 +25,7 @@ jwt-secret = "c2VjdXJpdHl0aHJvdWdob2JzY3VyaXR5aW5iYXNlNjQ="
jwt-secret-is-base64 = true
jwt-cache-max-lifetime = 86400
log-level = "info"
log-query = "main-query"
openapi-mode = "ignore-privileges"
openapi-security-active = true
openapi-server-proxy-uri = "https://postgrest.org"